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
076fac37
Commit
076fac37
authored
Mar 22, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify some code
parent
1d39c2ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Cython/Compiler/Tests/TestParseTreeTransforms.py
Cython/Compiler/Tests/TestParseTreeTransforms.py
+3
-4
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+2
-2
No files found.
Cython/Compiler/Tests/TestParseTreeTransforms.py
View file @
076fac37
...
@@ -225,13 +225,12 @@ class TestDebugTransform(DebuggerTestCase):
...
@@ -225,13 +225,12 @@ class TestDebugTransform(DebuggerTestCase):
L
=
list
(
t
.
find
(
'/Module/Globals'
))
L
=
list
(
t
.
find
(
'/Module/Globals'
))
# assertTrue is retarded, use the normal assert statement
# assertTrue is retarded, use the normal assert statement
assert
L
assert
L
xml_globals
=
dict
(
xml_globals
=
dict
((
e
.
attrib
[
'name'
],
e
.
attrib
[
'type'
])
for
e
in
L
)
[(
e
.
attrib
[
'name'
],
e
.
attrib
[
'type'
])
for
e
in
L
])
self
.
assertEqual
(
len
(
L
),
len
(
xml_globals
))
self
.
assertEqual
(
len
(
L
),
len
(
xml_globals
))
L
=
list
(
t
.
find
(
'/Module/Functions'
))
L
=
list
(
t
.
find
(
'/Module/Functions'
))
assert
L
assert
L
xml_funcs
=
dict
(
[(
e
.
attrib
[
'qualified_name'
],
e
)
for
e
in
L
]
)
xml_funcs
=
dict
(
(
e
.
attrib
[
'qualified_name'
],
e
)
for
e
in
L
)
self
.
assertEqual
(
len
(
L
),
len
(
xml_funcs
))
self
.
assertEqual
(
len
(
L
),
len
(
xml_funcs
))
# test globals
# test globals
...
@@ -242,7 +241,7 @@ class TestDebugTransform(DebuggerTestCase):
...
@@ -242,7 +241,7 @@ class TestDebugTransform(DebuggerTestCase):
funcnames
=
(
'codefile.spam'
,
'codefile.ham'
,
'codefile.eggs'
,
funcnames
=
(
'codefile.spam'
,
'codefile.ham'
,
'codefile.eggs'
,
'codefile.closure'
,
'codefile.inner'
)
'codefile.closure'
,
'codefile.inner'
)
required_xml_attrs
=
'name'
,
'cname'
,
'qualified_name'
required_xml_attrs
=
'name'
,
'cname'
,
'qualified_name'
assert
all
(
[
f
in
xml_funcs
for
f
in
funcnames
]
)
assert
all
(
f
in
xml_funcs
for
f
in
funcnames
)
spam
,
ham
,
eggs
=
[
xml_funcs
[
funcname
]
for
funcname
in
funcnames
]
spam
,
ham
,
eggs
=
[
xml_funcs
[
funcname
]
for
funcname
in
funcnames
]
self
.
assertEqual
(
spam
.
attrib
[
'name'
],
'spam'
)
self
.
assertEqual
(
spam
.
attrib
[
'name'
],
'spam'
)
...
...
Cython/Compiler/TypeSlots.py
View file @
076fac37
...
@@ -67,8 +67,8 @@ class Signature(object):
...
@@ -67,8 +67,8 @@ class Signature(object):
# and are not looked up in here
# and are not looked up in here
}
}
type_to_format_map
=
dict
(
[(
type_
,
format_
)
type_to_format_map
=
dict
(
for
format_
,
type_
in
format_map
.
iteritems
()]
)
(
type_
,
format_
)
for
format_
,
type_
in
format_map
.
iteritems
()
)
error_value_map
=
{
error_value_map
=
{
'O'
:
"NULL"
,
'O'
:
"NULL"
,
...
...
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