By passing a function to another function I meant passing a code block as an
inline function to a function call.
The do statement is simply the arguments the function is called with
Brackets = optional
as expr [do comma-separated-expressions]:
block
means evaluate expr, then call the result of the expression. If do is present,
call it with the argument list after do. Otherwise, call it with no arguments.
> If you don't have practical uses, this proposal has ZERO chance of being
> accepted.
I have already shown a Flask use case and another poster has mentioned they
would find it useful in their own code. (Though they had reservations on
whether it should be included in Python.)
I simply said I wasn’t totally aware of all practical use cases, especially
practical abuse cases.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/