Skip to content

Instantly share code, notes, and snippets.

@llllllllll
Created January 3, 2018 08:38
Show Gist options
  • Save llllllllll/d7ee7a63ca2e449726e63f4ac8283bfb to your computer and use it in GitHub Desktop.
Save llllllllll/d7ee7a63ca2e449726e63f4ac8283bfb to your computer and use it in GitHub Desktop.
generator qualname
In [1]: def f():
...: def g():
...: yield
...: return g
...:
In [2]: g = f()
In [3]: g().__qualname__
Out[3]: 'f.<locals>.g'
In [4]: g(*(), **{}).__qualname__
Out[4]: 'g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment