Scheme style and Python style [was: Re: Typed Python?]
pinard at iro.umontreal.ca
Wed Jul 7 21:05:11 CEST 2004
> Yes, indeed having iterators and generators built-in in the language
> (as well as an exception system) exhaust most of the use case for
> continuation so you don't really feel the need for them in Python in
> normal circumstances.
I recently worked on my little `pynits' tool (hoping to release it a
third time, as soon as I'm satisfied enough with the changes), and have
a need for continuations there. The circumstances for that need may be
slightly unusual, but I would surely not qualify them as abnormal :-).
Suddenly backtracking out of a complex involvement for restarting in a
new direction, for the above project at least, requires a lot of state
resumption, and doing this cleanly in Python implies a rather strict and
burdening discipline about where and how the state information is kept.
While tractable, this is not as comfortable as I would have liked it...
Maybe I'll find better ways if I let the problem mature enough? :-)
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list