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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
df470e8e
Commit
df470e8e
authored
Feb 08, 2016
by
Jeroen Demeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support parse_list("")
parent
96a14165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+5
-1
No files found.
Cython/Build/Dependencies.py
View file @
df470e8e
...
...
@@ -122,6 +122,10 @@ def file_hash(filename):
def
parse_list
(
s
):
"""
>>> parse_list("")
[]
>>> parse_list("a")
['a']
>>> parse_list("a b c")
['a', 'b', 'c']
>>> parse_list("[a, b, c]")
...
...
@@ -131,7 +135,7 @@ def parse_list(s):
>>> parse_list('[a, ",a", "a,", ",", ]')
['a', ',a', 'a,', ',']
"""
if
s
[
0
]
==
'['
and
s
[
-
1
]
==
']'
:
if
len
(
s
)
>=
2
and
s
[
0
]
==
'['
and
s
[
-
1
]
==
']'
:
s
=
s
[
1
:
-
1
]
delimiter
=
','
else
:
...
...
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