Another benefit of given compared with := that I just thought of is this.
Suppose you have a generator like
(expression(f(x), y, z)
for x in xs
for y in ys(x)
for z in zs(y))
With given notation you can optimize:
(expression(f_x, y, z)
for x in xs
given f_x = f(x)
for y in ys(x)
for z in zs(y))
whereas with :=, you can't.
Best,
Neil
On Sat, May 12, 2018 at 10:56 PM David Mertz
Are votes cast in Edwin Hewitt's Hyperreals? I had thought python-ideas voted in the domain R rather than *R. :-)
On Sat, May 12, 2018, 5:20 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
David Mertz writes:
Only the BDFL has a vote with non-zero weight.
"Infinitesimal" != "zero".
Pedantically yours,
--
--- You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/CFuqwmE8s-E/unsubscribe. To unsubscribe from this group and all its topics, send an email to python-ideas+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
--
--- You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/CFuqwmE8s-E/unsubscribe. To unsubscribe from this group and all its topics, send an email to python-ideas+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.