Message10214
This was changed in 2.7 beta 4 per NEWS:
- Abstract methods of an inherited class or interface from Java
now raise NotImplementedError, instead of returning None (in
Java, null) or some "zero", if they are not implemented in the
extending Python class.
It should be straightforward to provide a class decorator -- or
equivalently, a function on classes -- that supports the original
behavior. Maybe even put this decorator in jythonlib?
@jythonlib.NotImplementedMethodsReturnNone
class MyAdapter(InternalFrameAdapter):
def internalFrameActivated(self, e):
print e
or perhaps have a slightly more precise decorator, let's call it
NotImplementedVoidMethodsDoNothing. Completely explicit here - void
methods per above are for side effects, so not doing anything can be
quite reasonable. |
|
Date |
User |
Action |
Args |
2015-09-03 20:41:33 | zyasoft | set | messageid: <1441312893.33.0.376419469617.issue2389@psf.upfronthosting.co.za> |
2015-09-03 20:41:33 | zyasoft | set | recipients:
+ zyasoft, kensingtoncat |
2015-09-03 20:41:33 | zyasoft | link | issue2389 messages |
2015-09-03 20:41:32 | zyasoft | create | |
|