Commit c0e9631f authored by Robert Bradshaw's avatar Robert Bradshaw

String literal identifiers ending in newlines.

parent 5ba1cc8c
...@@ -289,7 +289,7 @@ class PyObjectConst(object): ...@@ -289,7 +289,7 @@ class PyObjectConst(object):
possible_unicode_identifier = re.compile(ur"(?![0-9])\w+$", re.U).match possible_unicode_identifier = re.compile(ur"(?![0-9])\w+$", re.U).match
possible_bytes_identifier = re.compile(r"(?![0-9])\w+$".encode('ASCII')).match possible_bytes_identifier = re.compile(r"(?![0-9])\w+$".encode('ASCII')).match
nice_identifier = re.compile('^[a-zA-Z0-9_]+$').match nice_identifier = re.compile(r'\A[a-zA-Z0-9_]+\Z').match
find_alphanums = re.compile('([a-zA-Z0-9]+)').findall find_alphanums = re.compile('([a-zA-Z0-9]+)').findall
class StringConst(object): class StringConst(object):
......
...@@ -103,6 +103,9 @@ __doc__ = ur""" ...@@ -103,6 +103,9 @@ __doc__ = ur"""
True True
>>> len(u6) >>> len(u6)
7 7
>>> newlines == "Aaa\n"
True
""" """
import sys import sys
...@@ -127,3 +130,5 @@ u3 = ur"abc\x11" ...@@ -127,3 +130,5 @@ u3 = ur"abc\x11"
u4 = Ur"abc\x11" u4 = Ur"abc\x11"
u5 = uR"abc\x11" u5 = uR"abc\x11"
u6 = UR"abc\x11" u6 = UR"abc\x11"
newlines = "Aaa\n"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment