Message5885
Workaround as discussed in my email on jython-users:
from java.util import LinkedHashMap
def monkeypatch_method_if_not_set(cls):
def decorator(func):
if not hasattr(cls, func.__name__):
setattr(cls, func.__name__, func)
return func
return decorator
@monkeypatch_method_if_not_set(LinkedHashMap)
def iteritems(self):
return ((entry.getKey(), entry.getValue()) for entry in self.entrySet())
# equivalent functionality - we will do a similar type of guard
try:
LinkedHashMap.update
except AttributeError:
LinkedHashMap.update = LinkedHashMap.putAll
LinkedHashMap.iterkeys = LinkedHashMap.keySet
LinkedHashMap.itervalues = LinkedHashMap.values
# etc
Implement something like this directly in the proxy generation. |
|
Date |
User |
Action |
Args |
2010-07-09 14:47:44 | zyasoft | set | recipients:
+ zyasoft |
2010-07-09 14:47:44 | zyasoft | set | messageid: <1278686864.08.0.336875225827.issue1631@psf.upfronthosting.co.za> |
2010-07-09 14:47:44 | zyasoft | link | issue1631 messages |
2010-07-09 14:47:43 | zyasoft | create | |
|