Message7183
The 'attrgetter' method in the 'operator' library does not appear to function as expected.
Environment: jython2.7a2, w/ OpenJDK-6 on Ubuntu 12.04
Test: try running the code below:
class Foo(object):
pass
class Bar(object):
pass
f = Foo()
f.bar = Bar()
f.bar.bat = 5
from operator import attrgetter
print attrgetter("bar.bat")(f)
----
The result is this error:
Traceback (most recent call last):
File "t.py", line 13, in <module>
print attrgetter("bar.bat")(f)
AttributeError: 'Foo' object has no attribute 'bar.bat'
This specifically causes problems when used with SqlAlchemy 0.7.7, as per this thread:
http://groups.google.com/group/sqlalchemy/browse_thread/thread/8dd77dccad818ba6
PS: I'm just getting into Jython, looks like a very cool tool, and potentially very useful as well. |
|
Date |
User |
Action |
Args |
2012-06-06 15:42:06 | adorsk | set | recipients:
+ adorsk |
2012-06-06 15:42:06 | adorsk | set | messageid: <1338997326.02.0.307996940832.issue1909@psf.upfronthosting.co.za> |
2012-06-06 15:42:05 | adorsk | link | issue1909 messages |
2012-06-06 15:42:05 | adorsk | create | |
|