Message99061
| Author |
ezio.melotti |
| Recipients |
ezio.melotti, tormen |
| Date |
2010年02月08日.19:06:54 |
| SpamBayes Score |
0.0004476479 |
| Marked as misclassified |
No |
| Message-id |
<1265656016.86.0.484926870212.issue7886@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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: ... |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年02月08日 19:06:56 | ezio.melotti | set | recipients:
+ ezio.melotti, tormen |
| 2010年02月08日 19:06:56 | ezio.melotti | set | messageid: <1265656016.86.0.484926870212.issue7886@psf.upfronthosting.co.za> |
| 2010年02月08日 19:06:54 | ezio.melotti | link | issue7886 messages |
| 2010年02月08日 19:06:54 | ezio.melotti | create |
|