py: Implement builtin reversed() function.

reversed function now implemented, and works for tuple, list, str, bytes
and user objects with __len__ and __getitem__.

Renamed mp_builtin_len to mp_obj_len to make it publically available (eg
for reversed).
This commit is contained in:
Damien George
2014-08-12 18:33:40 +01:00
parent 69c5fe1df6
commit 4c03b3a899
9 changed files with 125 additions and 12 deletions

View File

@@ -72,6 +72,7 @@ PY_O_BASENAME = \
objnone.o \
objnamedtuple.o \
objrange.o \
objreversed.o \
objset.o \
objslice.o \
objstr.o \