Well, that's just a general problem with decorator ordering.

On Wed, Nov 26, 2014 at 4:57 PM, Chris Angelico <ros...@gmail.com> wrote:

> On Thu, Nov 27, 2014 at 11:50 AM, Guido van Rossum <gu...@python.org>
> wrote:
> > No, that was a figure of speech. The proposed decorator returns a new
> > function object that references a new code object. The original function
> and
> > code object are unchanged.
>
> Then it has a potentially-confusing interaction with decorators like
> Flask's app.route(), which return the original function unchanged, but
> also save a reference to it elsewhere. The order of decoration
> determines the effect of the @hettinger decorator; there will be two
> functions around which are almost, but not entirely, identical, and
> it'd be very easy to not notice that you decorated in the wrong order.
>
> ChrisA
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@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)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to