Ezio Melotti <ezio.melo...@gmail.com> added the comment: list.reverse() reverses the list *in place* and returns None, and "for item in None: ..." correctly raises a TypeError because None is not iterable.
You either want for item in reversed(mylist): ... or mylist.reverse() for item in mylist: ... ---------- nosy: +ezio.melotti priority: -> low resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7886> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com