Menu

#192 accesssing __dict__ from imported module in nested packages

open
nobody
None
5
2007-01-30
2006-12-15
Tim Diggins
No

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

Discussion

  • Tim Diggins

    Tim Diggins - 2006-12-15

    example of problem

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-01-15
    • status: open --> pending
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-01-15

    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?

     
  • Nobody/Anonymous

    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!

     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    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).

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-01-30

    Logged In: YES
    user_id=617340
    Originator: NO

    Oops, should not be in pending state.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-01-30
    • status: closed --> open
     
  • Tim Diggins

    Tim Diggins - 2007-11-29

    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)

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.