Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
c0e9631f
Commit
c0e9631f
authored
May 10, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
String literal identifiers ending in newlines.
parent
5ba1cc8c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+1
-1
tests/run/strliterals.pyx
tests/run/strliterals.pyx
+5
-0
No files found.
Cython/Compiler/Code.py
View file @
c0e9631f
...
...
@@ -289,7 +289,7 @@ class PyObjectConst(object):
possible_unicode_identifier
=
re
.
compile
(
ur"(?![0-9])\
w+$
", re.U).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
class StringConst(object):
...
...
tests/run/strliterals.pyx
View file @
c0e9631f
...
...
@@ -103,6 +103,9 @@ __doc__ = ur"""
True
>>> len(u6)
7
>>> newlines == "Aaa\n"
True
"""
import
sys
...
...
@@ -127,3 +130,5 @@ u3 = ur"abc\x11"
u4
=
Ur"abc\x11"
u5
=
uR"abc\x11"
u6
=
UR"abc\x11"
newlines
=
"Aaa
\
n
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment