From: Alex t. J. U. <re...@bu...> - 2012-06-06 15:42:18
|
New submission from Alex the Jython User <ad...@gm...>: 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. ---------- components: Library messages: 7183 nosy: adorsk severity: normal status: open title: attrgetter not working versions: 2.7a2 _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1909> _______________________________________ |