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.) I think this is a good idea because the original function signature is the most obvious documentation of its arguments. If i see: def func(foo, bar, *arg) [decorator]: ... i am inclined to expect that func will accept two arguments named foo and bar and optionally some more arguments, with their meanings having something to do with their names and the descriptions in the docstring. This need not be enforced by any interpreter mechanism. I just think it should be the encouraged practice. -- ?!ng
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