Skip to content

Instantly share code, notes, and snippets.

@veloutin
Created May 22, 2013 18:01
Show Gist options
  • Save veloutin/5629549 to your computer and use it in GitHub Desktop.
Save veloutin/5629549 to your computer and use it in GitHub Desktop.
There there
>>> import p.a
B notfound
A <module 'p.b' from 'p/b.py'>
import p.b
print("A", getattr(p, "b", "notfound"))
import p.a
print("B", getattr(p, "a", "notfound"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment