On Oct 7, 9:23 am, Lawrence D'Oliveiro <l...@geek-
central.gen.new_zealand> wrote:
> x = {1 : "One", 2 : "Two", 3 : "Three"}.get(i, "None Of The Above")

More like:
x = {1:lambda:"One", 2:lambda:"Two", 3:lambda:"Three"}.get(i,
lambda:"None Of The Above")()

i.e. deferred evaluation of selected case.

In Algol68 this would be:
x:=(i|"One","Two","Three"|"None Of The Above")

N
--
To download Linux's Algol68 Compiler, Interpreter & Runtime:
* http://sourceforge.net/projects/algol68/files
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to