[Python-Dev] Why aren't decorators just expressions? (original) (raw)

Barry Warsaw barry at python.org
Sat Sep 16 12:42:55 EDT 2017


On Sep 16, 2017, at 02:39, Larry Hastings <larry at hastings.org> wrote:

I'm not proposing that we allow arbitrary expressions as decorators... well, I'm not doing that yet at least. But like I said, the syntax has been this way for 13 years and I don't recall anybody complaining.

Indeed, I can’t remember a single time where I’ve needed that, let alone actually realized the restriction existed. But now that you mention it, I do remember discussions in favor of the more restricted syntax when the feature was originally being debated. I don’t remember the reasons though - it well could have been an abundance of caution over how far to take the new syntax (and understanding of course that it’s easier to relax than restrict).

-Barry

-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Message signed with OpenPGP URL: <http://mail.python.org/pipermail/python-dev/attachments/20170916/285cc0bd/attachment.sig>



More information about the Python-Dev mailing list