> Indeed, I can’t remember a single time where I’ve needed that, let alone
actually realized the restriction existed.

Likewise. I suspect the use of a function sort of just fell out from the
pre-decorator usage. Things like staticmethod()
<https://docs.python.org/2/library/functions.html#staticmethod> and
classmethod() <https://docs.python.org/2/library/functions.html#classmethod>
were
used well before decorators were available. (According to the linked 2.7
doc references, both were introduced in 2.2, with decorator tweaks coming
along in 2.4.) In fact, those two functions might have been the most
significant driving force in the development of decorators, which, I
believe, were always just thought if as nothing more than syntactic sugar
for existing common use cases.

Skip
_______________________________________________
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