[Tutor] Are you allowed to shoot camels? [kinda OT]
Alan Gauld
alan.gauld at freenet.co.uk
Mon Feb 7 21:08:04 CET 2005
> 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.
More information about the Tutor
mailing list