On 22/08/18 07:11, Steven D'Aprano wrote:
"Wait wait wait!" should ideally never happen. In programming, surprises
are not a good thing, and they're even less good when they are
retroactive.

"Ha, fooled you! You thought you were dealing with an eagerly evaluated
expression, but it was a deferred function body declaration instead!
Mwahahahaha!!!"

This, by the way, is why think using the same syntax for function definition and generator definition was a mistake. It's only when I reach a "yield" statement that I realise my expectations for this code are wrong.

(That was a decision made a long time ago, and I'm not fool enough to think that there's any benefit in trying to change it now. I can still be a grumpy old man over it, though.)

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
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