This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cool-RR
Date 2010-09-16.12:28:11
SpamBayes Score 0.00040971627
Marked as misclassified No
Message-id <1284640093.44.0.797706221833.issue9872@psf.upfronthosting.co.za>
In-reply-to
Content
Let's say you have this structure:

a\
  __init__.py
  b\
    __init__.py

In `b.__init__` a function called `my_function` is defined.

And assume that `a` and `b` are both on `sys.path`. Then this situation happens:

    >>> import a.b
    >>> import b
    >>> a.b.my_function is b.my_function
    False
    >>> a.b.my_function
    <function my_function at 0x00BC70C0>
    >>> b.my_function
    <function my_function at 0x00BC7108>
    >>> a.b.my_function.__module__
    'a.b'
    >>> b.my_function.__module__
    'b'

It seems that `a.b.my_function` and `b.my_function` are different objects.
History
Date User Action Args
2010-09-16 12:28:13cool-RRsetrecipients: + cool-RR
2010-09-16 12:28:13cool-RRsetmessageid: <1284640093.44.0.797706221833.issue9872@psf.upfronthosting.co.za>
2010-09-16 12:28:12cool-RRlinkissue9872 messages
2010-09-16 12:28:11cool-RRcreate