This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author randolf.scholz
Recipients AlexWaygood, berker.peksag, corona10, randolf.scholz, rhettinger, serhiy.storchaka, terry.reedy, wim.glenn
Date 2021-10-12.07:32:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634023942.76.0.787879038597.issue45356@roundup.psfhosted.org>
In-reply-to
Content
@Alex Regarding my proposal, the crucial part is the desiderata, not the hacked up implementation I presented.

And I really believe that at least that part I got hopefully right. After all, what does `@classmethod` functionally do? It makes the first argument of the function receive the class type instead of the object instance and makes it possible to call it directly from the class without instantiating it. I would still expect `MyClass.__dict__["themethod"]` to behave, as an object, much the same, regardless if it was decorated with `@classmethod` or not.

Regarding code breakage - yes that is a problem, but code is already broken and imo Python needs to make a big decision going forward: 

1. Embrace decorator chaining and try hard to make it work universally (which afaik was never intended originally when decorators were first introduced). As a mathematician I would love this, also adding `@` as a general purpose function composition operator would add quite some useful functional programming aspects to python.
2. Revert changes from 3.9 and generally discourage decorator chaining.

At this point however I want to emphasize that I am neither a CS major nor a python expert (I only started working with the language 3 years ago), so take everything I say as what it is - the opinion of some random stranger from the internet (:
History
Date User Action Args
2021-10-12 07:32:22randolf.scholzsetrecipients: + randolf.scholz, rhettinger, terry.reedy, berker.peksag, serhiy.storchaka, wim.glenn, corona10, AlexWaygood
2021-10-12 07:32:22randolf.scholzsetmessageid: <1634023942.76.0.787879038597.issue45356@roundup.psfhosted.org>
2021-10-12 07:32:22randolf.scholzlinkissue45356 messages
2021-10-12 07:32:22randolf.scholzcreate