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
9cefcb88
Commit
9cefcb88
authored
Jul 11, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
7f36b856
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-10
No files found.
Cython/Compiler/ExprNodes.py
View file @
9cefcb88
...
@@ -9641,22 +9641,20 @@ class BoolBinopNode(ExprNode):
...
@@ -9641,22 +9641,20 @@ class BoolBinopNode(ExprNode):
return
self
.
operand1
.
may_be_none
()
or
self
.
operand2
.
may_be_none
()
return
self
.
operand1
.
may_be_none
()
or
self
.
operand2
.
may_be_none
()
def
calculate_constant_result
(
self
):
def
calculate_constant_result
(
self
):
operand1
=
self
.
operand1
.
constant_result
operand2
=
self
.
operand2
.
constant_result
if
self
.
operator
==
'and'
:
if
self
.
operator
==
'and'
:
self
.
constant_result
=
\
self
.
constant_result
=
operand1
and
operand2
self
.
operand1
.
constant_result
and
\
self
.
operand2
.
constant_result
else
:
else
:
self
.
constant_result
=
\
self
.
constant_result
=
operand1
or
operand2
self
.
operand1
.
constant_result
or
\
self
.
operand2
.
constant_result
def
compile_time_value
(
self
,
denv
):
def
compile_time_value
(
self
,
denv
):
operand1
=
self
.
operand1
.
compile_time_value
(
denv
)
operand2
=
self
.
operand2
.
compile_time_value
(
denv
)
if
self
.
operator
==
'and'
:
if
self
.
operator
==
'and'
:
return
self
.
operand1
.
compile_time_value
(
denv
)
\
return
operand1
and
operand2
and
self
.
operand2
.
compile_time_value
(
denv
)
else
:
else
:
return
self
.
operand1
.
compile_time_value
(
denv
)
\
return
operand1
or
operand2
or
self
.
operand2
.
compile_time_value
(
denv
)
def
coerce_to_boolean
(
self
,
env
):
def
coerce_to_boolean
(
self
,
env
):
return
BoolBinopNode
.
from_node
(
return
BoolBinopNode
.
from_node
(
...
...
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