Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
48697f1d
Commit
48697f1d
authored
Feb 01, 2014
by
Damien George
Browse files
Tidy up some comments.
parent
9aa2a527
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/runtime.c
View file @
48697f1d
...
...
@@ -519,8 +519,6 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
// deal with is
if
(
op
==
RT_BINARY_OP_IS
)
{
// TODO: may need to handle strings specially, CPython appears to
// assume all strings are interned (so "is" == "==" for strings)
return
MP_BOOL
(
lhs
==
rhs
);
}
...
...
@@ -624,13 +622,13 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
/* deal with `in`
*
* NOTE `a in b` is `b.__contains__(a)`, hence why the generic dispatch
* needs to go below
* needs to go below
with swapped arguments
*/
if
(
op
==
RT_BINARY_OP_IN
)
{
mp_obj_type_t
*
type
=
mp_obj_get_type
(
rhs
);
if
(
type
->
binary_op
!=
NULL
)
{
mp_obj_t
res
=
type
->
binary_op
(
op
,
rhs
,
lhs
);
if
(
res
!=
NULL
)
{
if
(
res
!=
MP_OBJ_
NULL
)
{
return
res
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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