Suggesting a new feature - "Inverse Generators"
Serge Orlov
Serge.Orlov at gmail.com
Fri Mar 25 14:14:36 EST 2005
Michael Spencer wrote:
> > Still, this is fascinating.... going to have to spend some time
> > experimenting with groupby as soon as I get a chance....
> >
> Experimenting is good. So is the the documentation:
> http://docs.python.org/tut/tut.html
Reading documentation is a good idea, but I think your example would
be more clear for Jordan if you used function attributes:
def record(item):
if len(item) > 20:
record.seq +=1
return record.seq
record.seq = 0
Serge.
More information about the Python-list
mailing list