mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-106727: Make inspect.getsource
smarter for class for same name definitions (#106815)
This commit is contained in:
parent
505eede38d
commit
663854d73b
4 changed files with 71 additions and 12 deletions
|
@ -290,3 +290,23 @@ post_line_parenthesized_lambda1 = (lambda: ()
|
|||
nested_lambda = (
|
||||
lambda right: [].map(
|
||||
lambda length: ()))
|
||||
|
||||
# line 294
|
||||
if True:
|
||||
class cls296:
|
||||
def f():
|
||||
pass
|
||||
else:
|
||||
class cls296:
|
||||
def g():
|
||||
pass
|
||||
|
||||
# line 304
|
||||
if False:
|
||||
class cls310:
|
||||
def f():
|
||||
pass
|
||||
else:
|
||||
class cls310:
|
||||
def g():
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue