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
3dc2263e
Commit
3dc2263e
authored
Feb 06, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when indexing/slicing 'str', it's safe to infer 'str' for the result
parent
1e12bf46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
3dc2263e
...
@@ -2087,8 +2087,8 @@ class IndexNode(ExprNode):
...
@@ -2087,8 +2087,8 @@ class IndexNode(ExprNode):
return
base_type
.
base_type
return
base_type
.
base_type
# may be slicing or indexing, we don't know
# may be slicing or indexing, we don't know
if
base_type
i
s
unicode_type
:
if
base_type
i
n
(
unicode_type
,
str_type
)
:
# th
is type always returns its
own type on Python indexing/slicing
# th
ese types always returns their
own type on Python indexing/slicing
return
base_type
return
base_type
else
:
else
:
# TODO: Handle buffers (hopefully without too much redundancy).
# TODO: Handle buffers (hopefully without too much redundancy).
...
...
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