On Sun, Feb 19, 2017 at 10:13 AM, Joseph Hackman <[email protected]>
wrote:
>
> My honest preference would be that the [] is evaluated fresh each time the
> function is called.
> def stuff(arg=delayed f()):
> would result in f() being called every time stuff() is. This seems more
> valuable to me than just doing it once when the function is first called.
>
This doesn't make sense. Function definition time is very different than
function execution time. Changing that distinction is a WAY bigger change
than I think we should contemplate.
Moreover, there is a completely obvious way to spell the behavior you want:
def stuff():
arg = f()
# ... whatever ...
This is exactly the obvious way to spell "f() is called every time stuff()
is".
--
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons. Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/