Pymacs 0.11
Carel Fellinger
cfelling at iae.nl
Wed Oct 17 18:45:11 EDT 2001
François Pinard <pinard at iro.umontreal.ca> wrote:
> [Carel Fellinger]
>> François Pinard <pinard at iro.umontreal.ca> wrote:
>> > interactions[hello_world] = ''
>> why not use function attributes, like:
>> hello_world.lisp_interaction = ''
> Are these available in Python 1.5.2, say? I wants Pymacs to be reasonably
> portable.
You're right. I'm so happy with the generator stuff, that I forgot that
many still have to do with 1.5.2. So the fall back method should be yours.
But maby it's possible--in anticipation of a wider usage of more modern
Pythons--to check first for such a function attribute, like:
try:
interaction = fun.lisp_interaction
except NameError:
interaction = interactions[fun]
--
groetjes, carel
More information about the Python-list
mailing list