Ka-Ping Yee <python-dev at zesty.ca> writes: > There has been some discussion about whether decorators are required > to be callable, accept callables, or return callables. > > I would like to ask that the PEP recommend (perhaps strongly, but not > require) that decorators preserve function argument signatures whenever > it is reasonable to do so. (That is, given a three-argument function > returning a string, a typical decorator should produce another three- > argument function returning a string.) Careful, here. >>> callable(classmethod(lambda cls:1)) False I agree with the spirit of your suggestion, though. [...] > This need not be enforced by any interpreter mechanism. I just think > it should be the encouraged practice. And (very much) with this. Cheers, mwh -- Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make the additional features appear necessary. -- Revised(5) Report on the Algorithmic Language Scheme
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4