PEP 255: Simple Generators
Tim Peters
tim.one at home.com
Sun Jun 17 17:48:20 EDT 2001
More information about the Python-list mailing list
Sun Jun 17 17:48:20 EDT 2001
- Previous message (by thread): PEP 255: Simple Generators
- Next message (by thread): PEP 255: Simple Generators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Robin Becker] > so the implication is that the state can't be got at explicitly and I > have to redefine the generator function part of the iterator to reset > it? can one copy a generator-iterator? Generator-iterators conform to the iterator protocol, and the latter has only a .next() method: no notion of reset, no notion of copy. PEP 255 doesn't go beyond that. Of course you can do, e.g., g1 = some_generator(x, y, z) g2 = some_generator(x, y, z) ... to get multiple independent generator-iterators.
- Previous message (by thread): PEP 255: Simple Generators
- Next message (by thread): PEP 255: Simple Generators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list