summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-05 17:19:03 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-05 17:19:03 +0100
commit6d508666ea9f524f5fc16fa95052e06144ac728e (patch)
treebfdb33b05ba08b2e13c3d37d154909f180e7e47b /py/obj.c
parent95004e5114bd40cea256c3228ffac682d231855d (diff)
parente99841be690fbc89763d05fdcfe5870d438a2dad (diff)
downloadmicropython-6d508666ea9f524f5fc16fa95052e06144ac728e.tar.gz
micropython-6d508666ea9f524f5fc16fa95052e06144ac728e.zip
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index 34a48cc681..d4eabbe840 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -181,6 +181,9 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) {
}
machine_int_t mp_obj_get_int(mp_obj_t arg) {
+ // This function essentially performs implicit type conversion to int
+ // Note that Python does NOT provide implicit type conversion from
+ // float to int in the core expression language, try some_list[1.0].
if (arg == mp_const_false) {
return 0;
} else if (arg == mp_const_true) {