> Well you can use lambdas. Have them return an expression which you
print
> after retrieving:
> ftable = { 'a' : lambda: 'a',
>              'b' : lambda: 'b or c',

> But it would be clearer to store just the expressions:
> ftable = { 'a' : 'a',
>              'b' : 'b or c',

True for this special case, but where the lambda has to do
some calculation it starts to make sense! :-)

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to