control structures (was "Re: Sins")
Skip Montanaro
skip at mojam.com
Sun Jan 9 09:32:34 EST 2000
>> This is a common thing, does this express the idea ?
[ ... out-of-line example snipped ... ]
skaller> Yes, that provides the required functionality, but has a
skaller> serious problem: cases have to be defined 'out of line', and
skaller> therefore do not have access to the current scope.
skaller> So I'm looking for a syntax for providing the above
skaller> functionality _inline_.
While not strictly inline, why not define your actions as methods of a
common class, then share the state they need access to as instance
attributes?
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098 | Python: Programming the way Guido indented...
More information about the Python-list
mailing list