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
Kirill Smelkov
cython
Commits
c82c4942
Commit
c82c4942
authored
7 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor indentation/code cleanup
parent
a2db27bb
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-5
No files found.
Cython/Compiler/ExprNodes.py
View file @
c82c4942
...
...
@@ -11866,16 +11866,16 @@ class CmpNode(object):
new_common_type
=
None
# catch general errors
if
type1
==
str_type
and
(
type2
.
is_string
or
type2
in
(
bytes_type
,
unicode_type
))
or
\
type2
==
str_type
and
(
type1
.
is_string
or
type1
in
(
bytes_type
,
unicode_type
)):
if
(
type1
==
str_type
and
(
type2
.
is_string
or
type2
in
(
bytes_type
,
unicode_type
))
or
type2
==
str_type
and
(
type1
.
is_string
or
type1
in
(
bytes_type
,
unicode_type
)
)):
error
(
self
.
pos
,
"Comparisons between bytes/unicode and str are not portable to Python 3"
)
new_common_type
=
error_type
# try to use numeric comparisons where possible
elif
type1
.
is_complex
or
type2
.
is_complex
:
if
op
not
in
(
'=='
,
'!='
)
\
and
(
type1
.
is_complex
or
type1
.
is_numeric
)
\
and
(
type2
.
is_complex
or
type2
.
is_numeric
):
if
(
op
not
in
(
'=='
,
'!='
)
and
(
type1
.
is_complex
or
type1
.
is_numeric
)
and
(
type2
.
is_complex
or
type2
.
is_numeric
)
):
error
(
self
.
pos
,
"complex types are unordered"
)
new_common_type
=
error_type
elif
type1
.
is_pyobject
:
...
...
This diff is collapsed.
Click to expand it.
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