On May 17, 10:39 am, Matus wrote:
> Hallo pylist,
>
> I searches web and python documentation for implementation of pushback
> iterator but found none in stdlib.
>
> problem:
>
> when you parse a file, often you have to read a line from parsed file
> before
#x27;s problem. He doesn't have a list (he /could/ build a list, and
> thus defeat the purpose of having an iterator). He /could/ use alternative
> data
> structures, like the dictionary you are suggesting... and he is, he is using
> his
> pushback iterator, but he has to include
purpose of having an iterator). He /could/ use alternative data
structures, like the dictionary you are suggesting... and he is, he is using his
pushback iterator, but he has to include it over and over.
Currently there is no good "pythonic" way of building a functions that decid
Somehow, I got the message off the list.
On Sun, 17 May 2009 17:42:43 +0200
Matus wrote:
> > Sounds to me more like an iterator with a cache - you can't really pull
> > the line from a real iterable like generator function and then just push
> > it back.
>
> true, that is why you have to implem
On Sun, 17 May 2009 16:39:38 +0200
Matus wrote:
> I searches web and python documentation for implementation of pushback
> iterator but found none in stdlib.
>
> problem:
>
> when you parse a file, often you have to read a line from parsed file
> before you can de
Hallo pylist,
I searches web and python documentation for implementation of pushback
iterator but found none in stdlib.
problem:
when you parse a file, often you have to read a line from parsed file
before you can decide if you want that line it or not. if not, it would
be a nice