Can someone explain this import behavior?
I'm in a directory with 3 files:

a.py contains `A = 1; from b import *`
b.py contains `from a import *; A += 1`
c.py contains `from a import A; print(A)`

Can you guess and explain what happens when you run `python c.py`?

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/bmispelon/statuses/116041593220352595 on your instance and quote it. (Note that quoting is not supported in Mastodon.)

0