
On Mon, Jun 13, 2022 at 07:41:12AM -0400, Todd wrote:
This has been proposed many times. You can check the mailing list history. Such proposals have been even less popular then PEP 671, since it requires a new keyword, which is generally avoided at nearly all costs,
Now that Python is using a PEG parser, adding a soft keyword is no big deal. We could use a named keyword: def spam(arg = defer default_expression): pass without affecting code that used "defer" as a variable or function name. We could even write: def spam(defer = defer defer()): ... where the same word "defer" refers to a parameter, a soft keyword, and a function call, all in the same function signature. Needless to say one should not make a habit of this. But it would be allowed. -- Steve