Message76001
| Author |
jmfauth |
| Recipients |
jmfauth, rhettinger |
| Date |
2008年11月18日.07:35:23 |
| SpamBayes Score |
3.354641e-07 |
| Marked as misclassified |
No |
| Message-id |
<46fcc31b0811172335l95fa7b6q8c849d258c3acc1b@mail.gmail.com> |
| In-reply-to |
<1226937965.43.0.385534886464.issue4337@psf.upfronthosting.co.za> |
| Content |
2008年11月17日 Raymond Hettinger <report@bugs.python.org>
>
> Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:
>
> Feature :-)
>
> You will get the expected result if you skip the step where you ran the
> for-loop over r before running list(). Either listing or for-looping
> will exhaust the iterator. This is how iterators work.
>
> ----------
> nosy: +rhettinger
> resolution: -> invalid
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4337>
> _______________________________________
>
Thanks for the reply and sorry for the noise. Indeed, you are right and for
some "strange personal reasons" (bad habits?), I frequently fall in this
trap.
return i + 1
[1, 2, 3, 4]
>>>
Regards |
| Files |
| File name |
Uploaded |
|
unnamed
|
jmfauth,
2008年11月18日.07:35:21
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年11月18日 07:35:24 | jmfauth | set | recipients:
+ jmfauth, rhettinger |
| 2008年11月18日 07:35:23 | jmfauth | link | issue4337 messages |
| 2008年11月18日 07:35:23 | jmfauth | create |
|