-
-
Save llllllllll/d7ee7a63ca2e449726e63f4ac8283bfb to your computer and use it in GitHub Desktop.
generator qualname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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