PEP 308: I liked the original proposal better

Steven Taschuk staschuk at telusplanet.net
Fri Feb 14 21:11:01 CET 2003


Quoth Mel Wilson:
> In article <mailman.1045199224.19020.python-list at python.org>,
> Andrew Bennetts <andrew-pythonlist at puzzling.org> wrote:
  [...]
> >Sure, but the Python I know also tends to be about doing things the
> >Left-to-Right way ;)
> 
> How do you program Python without assignment statements?

Why, by using the assignment-to-lambda refactoring, of course!
Instead of
	x = 2
	return x**2
write
	return (lambda x: x**2)(2)

(This kind of thing is made much of one of in Steele's lambda
papers.)

-- 
Steven Taschuk           | Kinsley's Law: "Every public
staschuk at telusplanet.net |  frenzy produces legislation
                         |  purporting to address it."





More information about the Python-list mailing list