Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
PyLucene, mail # dev - subclassing Python classes in Java


+
Bill Janssen 2011-02-16, 17:39
+
Andi Vajda 2011-02-16, 18:18
Copy link to this message
-
Re: subclassing Python classes in Java
Bill Janssen 2011-02-16, 19:08
Andi Vajda <[EMAIL PROTECTED]> wrote:

> On Feb 16, 2011, at 9:39, Bill Janssen <[EMAIL PROTECTED]> wrote:
>
> > How do I subclass a Python class in a JCC-wrapped Java module?
>
>  - define a Java class with native methods
>  - using the usual "extension" tricks have a Python class implement
> these native methods
>  - define a subclass of that Java class so as to inherit these native
> implementations

Yes, that's what I thought.  Almost too painful to consider, I'm afraid.

I was thinking of a more dynamic solution, using reflection, but that
seems a bit error-prone.  Problematic contrast beween the cheerful
dynamism of Python and the stern determinism of Java.

Bill