how to make a generator use the last yielded value when it regains control
Lonnie Princehouse
finite.automaton at gmail.com
Mon Apr 10 13:05:40 EDT 2006
More information about the Python-list mailing list
Mon Apr 10 13:05:40 EDT 2006
- Previous message (by thread): how to make a generator use the last yielded value when it regains control
- Next message (by thread): how to make a generator use the last yielded value when it regains control
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> What's wrong with the following ? > > def morris(seed,n) : > """...""" > for k in xrange(n-1) : > seed=length_encode(seed) > return seed Nothing's wrong with it. I happen to think the recursive version is more elegant, but that's just me ;-)
- Previous message (by thread): how to make a generator use the last yielded value when it regains control
- Next message (by thread): how to make a generator use the last yielded value when it regains control
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list