Santoso Wijaya <santoso.wij...@gmail.com> added the comment:

I wonder if this is a valid use-case to begin with. The semantic of a 
decorator, as I understand it, is very straightforward in that this:

    @foo
    @bar
    class A:
        pass

is equivalent to this:

    class A:
        pass
    A = foo(bar(A))

In your example, the equivalent statement is:

    y = deco(y)

Which gives you the somewhat surprising result, but it is as the language is 
designed.

----------
nosy: +santa4nt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11788>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to