Skip to content

Instantly share code, notes, and snippets.

@dgovil
Created September 18, 2017 01:33
Show Gist options
  • Save dgovil/284a2d99b87d37a9b69fd58f47a9c6e9 to your computer and use it in GitHub Desktop.
Save dgovil/284a2d99b87d37a9b69fd58f47a9c6e9 to your computer and use it in GitHub Desktop.
Python Circular Imports
import spam
def goodbye(name):
print("Goodbye {0}".format(name))
if __name__ == '__main__':
print(spam.abc)
spam.greet('Dan')
import foo
abc = '123'
def greet(name):
print("Hello, {0}".format(name))
if __name__ == '__main__':
foo.goodbye('Mary')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment