No auto-import option for operator.attrgetter
Brought to you by:
fabioz
Pydev 1.6.5 doesn't seem to recognize "attrgetter". I would expect it to suggest:
from operator import attrgetter
However, it doesn't. It also doesn't suggest an import for "itemgetter". I'm using python 2.6 on windows in Eclipse. Let me know if you need any more information.
Also, it looks like there's no group for 1.6.5 in the bug tracker.
Actually,
from operator import attrgetter
is working for me here... Do you have some error in your error log? What's your OS? (see: http://pydev.org/faq.html#how_do_i_report_a_bug\)
Cheers,
Fabio
Sorry, I may not have been clear. It's just that Pydev doesn't suggest the import correctly for me in the ctrl+1 menu.
Here's what I'm seeing:
http://img97.imageshack.us/img97/9872/attrgetter.png
Once I manually write the import, Pydev recognizes it just fine. There are no messages in the error log. OS is win 7 SP1 x64
The problem is that pydev only shows the ctrl+1 suggestions for modules which have source code (and operator is a builtin module without any sources).
So, for now that's correct (although there are plans to improve that, so, leaving bug open).
Cheers,
Fabio