Robert Vanden Eynde wrote:
One could see :

print(y with y = x+1)

As a shortcut for :

print(next(y for y in [ x+1 ]))

Or more straightforwardly,

   print((lambda y: y)(x + 1))

This is how the semantics of let-type constructs is
often defined in lambda-calculus-inspired languages
such as Scheme and Haskell, and it suggests a
viable implementation strategy.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to