Message328131
Example:
$ cat foo.py
import bar
bar.baz
$ cat bar.py
import foo
baz = 2
$ ./python foo.py
Traceback (most recent call last):
File "foo.py", line 1, in <module>
import bar
File "/home/serhiy/py/cpython/bar.py", line 1, in <module>
import foo
File "/home/serhiy/py/cpython/foo.py", line 2, in <module>
bar.baz
AttributeError: module 'bar' has no attribute 'baz'
Patched:
$ ./python foo.py
Traceback (most recent call last):
File "foo.py", line 1, in <module>
import bar
File "/home/serhiy/py/cpython/bar.py", line 1, in <module>
import foo
File "/home/serhiy/py/cpython/foo.py", line 2, in <module>
bar.baz
AttributeError: partially initialized module 'bar' has no attribute 'baz' (most likely due to a circular import) |
|
| Date |
User |
Action |
Args |
| 2018-10-20 07:52:13 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, eric.snow |
| 2018-10-20 07:52:13 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2018-10-20 07:52:13 | serhiy.storchaka | link | issue33237 messages |
| 2018-10-20 07:52:13 | serhiy.storchaka | create | |
|