Adam DePrince wrote:
How is a spencerator [an iterator that doesn't return itself unmodified on iter]
> different than itertools.tee?
Taking your question literally, it changes the behavior of an itertools.tee
object 'tee', so that iter(tee) returns tee.__copy__(), rather than tee itself.
It wa
Terry Reedy wrote:
"Michael Spencer" <[EMAIL PROTECTED]> wrote in message
We are both interested in the murky edges at and beyond conventional usage.
...
I am quite aware that multiple iterators for the same iterable (actual or
conceptual) can be useful (cross products, for example). But I am d
On Tue, 2005-02-15 at 19:25, Terry Reedy wrote:
> "Michael Spencer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Terry, thanks for responding in depth.
> We are both interested in the murky edges at and beyond conventional usage.
> > Terry wrote
> >> 2. "It is not essential
"Michael Spencer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Terry, thanks for responding in depth.
We are both interested in the murky edges at and beyond conventional usage.
> Terry wrote
>> 2. "It is not essential to not do something wasteful as long as it is >>
>> other
Le mardi 15 FÃvrier 2005 02:26, Terry Reedy a ÃcritÂ:
> "Francis Girard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> (Note for oldtimer nitpickers: except where relevant, I intentionally
> ignore the old and now mostly obsolete pseudo-__getitem__-based iteration
> protocol her
Michael Spencer wrote:
But, notwithstanding the docs, it is not essential that
iter(iterator) is iterator
Terry Reedy wrote:
> iter(iterator) is iterator is part of the iterater protocol
>
[...]I interpret [your post] as saying three things:
1. "There is more than one possible definition of 'iterat
"Michael Spencer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Terry Reedy wrote:
>> iter(iterator) is iterator is part of the iterater protocol
> But, notwithstanding the docs, it is not essential that
> iter(iterator) is iterator
If a program depends on that invariant, then i
"Francis Girard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
(Note for oldtimer nitpickers: except where relevant, I intentionally
ignore the old and now mostly obsolete pseudo-__getitem__-based iteration
protocol here and in other posts.)
Le dimanche 13 Février 2005 23:58, Te
Francis Girard wrote:
Le dimanche 13 FÃvrier 2005 23:58, Terry Reedy a Ãcrit :
Iterators are a subgroup of iterables. Being able to say iter(it) without
having to worry about whether 'it' is just an iterable or already an
iterator is one of the nice features of the new iteration design.
I have dif
Le dimanche 13 FÃvrier 2005 23:58, Terry Reedy a ÃcritÂ:
> Iterators are a subgroup of iterables. ÂBeing able to say iter(it) without
> having to worry about whether 'it' is just an iterable or already an
> iterator is one of the nice features of the new iteration design.
>
> Terry J. Reedy
Hi,
I
"Francis Girard" <[EMAIL PROTECTED]> wrote in message
an "iterator" doesn't have to support the "__iter__" method
Terry Reedy wrote:
Yes it does. iter(iterator) is iterator is part of the iterater protocol
for the very reason you noticed...
But, notwithstanding the docs, it is not essential t
Francis Girard wrote:
"""
Example 8
Running after your tail with itertools.tee
The beauty of it is that recursive running after their tai
"Francis Girard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> An ""iteratable"" class is a class supporting the __iter__ method which
> should
> return an ""iterator"" instance, that is, an instance of a class
> supporting
> the "next" method.
Not quite right, see below.
> An
13 matches
Mail list logo