py: Simplify and remove redundant code for __iter__ method lookup.

This commit is contained in:
Damien George
2015-02-15 01:10:13 +00:00
parent d1c3788375
commit f6532bb9e0
5 changed files with 39 additions and 38 deletions

View File

@@ -285,7 +285,7 @@ struct _mp_obj_type_t {
// value=MP_OBJ_NULL means delete, value=MP_OBJ_SENTINEL means load, else store
// can return MP_OBJ_NULL if op not supported
mp_fun_1_t getiter;
mp_fun_1_t getiter; // corresponds to __iter__ special method
mp_fun_1_t iternext; // may return MP_OBJ_STOP_ITERATION as an optimisation instead of raising StopIteration() (with no args)
mp_buffer_p_t buffer_p;