Skip to content

Instantly share code, notes, and snippets.

@suavesav
Created October 28, 2016 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suavesav/a17cc1489e60e2eda38a5091f9e9173d to your computer and use it in GitHub Desktop.
Save suavesav/a17cc1489e60e2eda38a5091f9e9173d to your computer and use it in GitHub Desktop.
foo.py
from bar import x

def y(a,b):
    print x(a,b)


bar.py
from foo import y

def x(a,b):
	return 'haha'

def z(a,b):
    print y(a,b)

this breaks


foo.py
from bar import x

def y(a,b):
    print x(a,b)


bar.py
def x(a,b):
	return 'haha'

def z(a,b):
	from foo import y
    print y(a,b)

this is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment