From: Robert A. <ra...@pp...> - 2009-03-03 20:28:14
|
Thanks, this is helpful. I guess I'll be extending PyObject but it sure would be nice if this could be done by implementing __getattr__ in the java class. Rob Andre On Tuesday 03 March 2009 11:11, Leo Soto M. wrote: > On Mon, Mar 2, 2009 at 5:52 PM, Robert Andre <ra...@pp...> wrote: > > What is the proper way of implementing __getattr__, __setattr__, > > __getitem, __setitem__ functionality from a java class? Does it require > > extending PyObject and would this be compatible for both 2.2 and 2.5? > > In case you take the "extending PyObject" route, > <http://wiki.python.org/jython/JythonDeveloperGuide/AttributeLookupMethods> > explain how to solve the __getattr__ case. |