what's in a name (was Re: using lambda to print everything in a list)

Joshua Marshall jmarshal at mathworks.com
Mon Apr 30 07:18:18 EDT 2001


Roman Suzi <rnd at onego.ru> wrote:

> Probably we should ask Guido for the construction like:

> exec:
>   res = e**(pi*x+y)
> where:
>   x = lenthy_function()
>   y = even_larger_function()
>   pi = math.pi
>   e = math.e

Which is equivalent to the more common:

 let:
   x = lenthy_function()
   y = even_larger_function()
   pi = math.pi
   e = math.e
 in:
   res = e**(pi*x+y)

But (unfortunately) Python doesn't have variable declarations and will
probably stay that way.



More information about the Python-list mailing list