Re: [Python-Dev] The iterator story

July 19, 2002
11:40 p.m.
From: "Alex Martelli" <aleax@aleax.it>
Maybe, or maybe not. I guess if the reiterable sequence adapter says "list(x)", nobody should be using it to find out whether a thing is reiterable. Or maybe the reiterable sequence adapter shouldn't say "list(x)" because that's destructive -- though that begs the question of finding out whether x is reiterable. Maybe the PEP is just a red herring as far as the iterator problem is concerned. As long as the language has built-in facilities like 'for' and 'in' which use iteration protocols at the core of the language, re-iterability ought to be expressible likewise, in core language terms, regardless of the more-extensible mechanisms of PEP 246. whole-pile-of-maybes-ly y'rs, dave
8278
Age (days ago)
8278
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Abrahams