You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Handle 3.6 Format String conversions !r, !s, !a
This commit is contained in:
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
var1 = 'x'
|
||||
var2 = 'y'
|
||||
print(f'interpolate {var1} strings {var2} py36')
|
||||
print(f'interpolate {var1} strings {var2!r} {var2!s} py36')
|
||||
|
@@ -591,7 +591,8 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# Python 3.6+ Additions
|
||||
#######################
|
||||
TABLE_DIRECT.update({
|
||||
'formatted_value': ( '{%c}', 0),
|
||||
'formatted_value': ( '{%c%c}', 0, 1),
|
||||
'FORMAT_VALUE': ( '%{pattr}', ),
|
||||
'joined_str': ( "f'%c'", 2),
|
||||
})
|
||||
return
|
||||
|
Reference in New Issue
Block a user