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
da1d5bb6
Commit
da1d5bb6
authored
Feb 08, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #485 from jdemeyer/parse_list
Fix parse_list("")
parents
38b79333
df470e8e
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 @
da1d5bb6
...
...
@@ -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