accesssing __dict__ from imported module in nested packages
Brought to you by:
fabioz
eclipse 3.2.1, pydev + ext 1.2.5
When attempting to access (from a module in a package) the implicit attribute __dict__ from an imported module (in the same or another package) the __dict__ is marked as "Undefined Variable from import".
However this doesn't happen when either the importing module or the imported module are in the root/default package.
It also doesn't appear to be a problem for explicitly declared functions or globals.
example attached
example of problem
Logged In: YES
user_id=617340
Originator: NO
So, it should work for:
__file__
__dict__
__doc__
__builtins__
Do you know if there is some other implicit attribute that pydev should care about?
Logged In: NO
hmmm - __class__ (for instances) and __module__ and __metaclass__(for classes) and __file__ (for modules) spring to mind...
there are more listed on http://docs.python.org/ref/types.html obviously... don't know how exhaustive you want to be in your coverage!
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Logged In: YES
user_id=617340
Originator: NO
Oops, should not be in pending state.
Logged In: YES
user_id=263040
Originator: YES
Any progress on this one?
__dict__ for any object
__class__ (for instances)
__module__ and __metaclass__(for classes)
__file__ (for modules)