Message116536
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. |
|
Date |
User |
Action |
Args |
2010-09-16 12:28:13 | cool-RR | set | recipients:
+ cool-RR |
2010-09-16 12:28:13 | cool-RR | set | messageid: <1284640093.44.0.797706221833.issue9872@psf.upfronthosting.co.za> |
2010-09-16 12:28:12 | cool-RR | link | issue9872 messages |
2010-09-16 12:28:11 | cool-RR | create | |
|