Fix bug in docstring triple quotes

Problem was not escaping """ inside """.
Use ''' when possible; and when not, use: \"\"\".
This commit is contained in:
rocky
2016-11-20 12:03:24 -05:00
parent 80df5dcc95
commit 805e17988e
3 changed files with 16 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
# uncompyle2 bug was not escaping """ properly
r'''func placeholder - with ("""\nstring\n""")'''
def foo():
r'''func placeholder - ' and with ("""\nstring\n""")'''
def bar():
r"""func placeholder - ' and with ('''\nstring\n''') and \"\"\"\nstring\n\"\"\" """