Menu

#636 Variable __path__ is marked as undefined

1.3.11
closed-fixed
Editor (491)
5
2008-01-27
2008-01-27
pm13
No

Variable __path__ can be used in packages (not in scripts) - it is described in PEP 302 (http://www.python.org/dev/peps/pep-0302). But pydev marked it as an error.

Steps:
1. Create a directory on the python path - for example "pydev_test".
2. Create file __init__.py in pydev_test with this function:
def get_path():
return __path__
3. Try this code:
from pydev_test import get_path
print get_path()

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-27
    • status: open --> closed-fixed
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-27

    Logged In: YES
    user_id=617340
    Originator: NO

    Fixed for 1.3.11

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-27

    Logged In: YES
    user_id=617340
    Originator: NO

    Oops... fixed for 1.3.12

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-27
    • milestone: --> 1.3.11