[Python-Dev] Call for prudence about PEP-572 (original) (raw)

Berker Peksağ berker.peksag at gmail.com
Mon Jul 9 05:24:47 EDT 2018


On Mon, Jul 9, 2018 at 8:54 AM, Tim Peters <tim.peters at gmail.com> wrote:

[Eric V. Smith]

> there is at least one place > where the grammar does forbid you from doing something that would > otherwise make be allowable: decorators. [Greg Ewing] And that was a controversial issue at the time. I don't remember there being much of an objective argument for the restriction -- it was more or less a matter of "Guido wanted it that way". Start here: https://mail.python.org/pipermail/python-dev/2004-August/046711.html

There is also an open issue about removing that restriction: https://bugs.python.org/issue19660

https://bugs.python.org/file32745/decorator-syntax.patch removes a test that raises SyntaxError for the following snippet:

@x[3] def foo(): pass

--Berker



More information about the Python-Dev mailing list