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
1c1fd444
Commit
1c1fd444
authored
Feb 13, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ctuple comparison.
parent
6d23c845
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-5
tests/run/ctuple.pyx
tests/run/ctuple.pyx
+11
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
1c1fd444
...
...
@@ -10501,10 +10501,9 @@ class CmpNode(object):
if
new_common_type
is
None
:
# fall back to generic type compatibility tests
if
type1
==
type2
:
if
type1
.
is_ctuple
:
if
type1
.
is_ctuple
or
type2
.
is_ctuple
:
new_common_type
=
py_object_type
else
:
elif
type1
==
type2
:
new_common_type
=
type1
elif
type1
.
is_pyobject
or
type2
.
is_pyobject
:
if
type2
.
is_numeric
or
type2
.
is_string
:
...
...
tests/run/ctuple.pyx
View file @
1c1fd444
...
...
@@ -120,6 +120,17 @@ def test_equality((int, int) ab, (int, int) cd, (int, int) ef):
"""
return
ab
<
cd
<=
ef
def
test_equality_different_types
((
double
,
int
)
ab
,
(
int
,
int
)
cd
,
(
long
,
int
)
ef
):
"""
>>> test_equality((1, 2), (3, 4), (5, 6))
True
>>> test_equality((1, 2), (3, 4), (3, 4))
True
>>> test_equality((3, 4), (3, 4), (3, 4))
False
"""
return
ab
<
cd
<=
ef
def
test_binop
((
int
,
int
)
ab
,
(
double
,
double
)
cd
):
"""
>>> test_binop((1, 2), (3, 4))
...
...
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