You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Wacky string at beginning of fn which is not docstring...
3.7.6 test_fstring.py tests this.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -67,3 +67,16 @@ def _repr_fn(fields):
|
||||
|
||||
fields = ['a', 'b', 'c']
|
||||
assert _repr_fn(fields) == ['return xx + f"(a={self.a!r}, b={self.b!r}, c={self.c!r})"']
|
||||
|
||||
|
||||
# From Python 3.7 test_fstring. Why this kind of thing matter seems a bit
|
||||
# academic, but decompile an equivalent thing. For compatiblity with older
|
||||
# Python we'll use "%" instead of a format string
|
||||
def f():
|
||||
f'''Not a docstring'''
|
||||
def g():
|
||||
'''Not a docstring''' \
|
||||
f''
|
||||
|
||||
assert f.__doc__ is None
|
||||
assert g.__doc__ is None
|
||||
|
Reference in New Issue
Block a user