mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
string_escape is better than unicode_escape.
This commit is contained in:
parent
f2bb968030
commit
e3364e0fdd
@ -211,7 +211,7 @@ def dqrepr(s):
|
||||
"""Returns a repr() of s guaranteed to be in double quotes."""
|
||||
# The wankers-that-be decided not to use double-quotes anymore in 2.3.
|
||||
# return '"' + repr("'\x00" + s)[6:]
|
||||
return '"%s"' % s.encode('unicode_escape').replace('"', '\\"')
|
||||
return '"%s"' % s.encode('string_escape').replace('"', '\\"')
|
||||
|
||||
nonEscapedSlashes = re.compile(r'(?<!\\)/')
|
||||
def perlReToPythonRe(s):
|
||||
|
Loading…
Reference in New Issue
Block a user