py: Add MP_OBJ_STOP_ITERATION and make good use of it.
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL.
This helps a lot in debugging and understanding of function API.
diff --git a/py/objnone.c b/py/objnone.c
index c79c818..fc55132 100644
--- a/py/objnone.c
+++ b/py/objnone.c
@@ -18,7 +18,7 @@
STATIC mp_obj_t none_unary_op(int op, mp_obj_t o_in) {
switch (op) {
case MP_UNARY_OP_BOOL: return mp_const_false;
- default: return MP_OBJ_NULL; // op not supported for None
+ default: return MP_OBJ_NOT_SUPPORTED;
}
}