[Python-Dev] Please reconsider PEP 479. (original) (raw)

Guido van Rossum guido at python.org
Thu Nov 27 02:11:14 CET 2014


A decorator with a side effect elsewhere (like the route registrations) is acceptable; one with a side effect on the decorated function is questionable, and instead the decorator should behave "functionally", i.e. return a new object instead.

On Wed, Nov 26, 2014 at 5:07 PM, Chris Angelico <rosuav at gmail.com> wrote:

On Thu, Nov 27, 2014 at 12:01 PM, Guido van Rossum <guido at python.org> wrote: > Well, that's just a general problem with decorator ordering.

Indeed. I was hoping it could be avoided in this instance by just altering code on an existing function, but if that's not possible, we fall back to what is, after all, a known and documented concern. ChrisA


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org

-- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20141126/12dc1076/attachment.html>



More information about the Python-Dev mailing list