A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/043688.html below:

[Python-Dev] PEP 318: Preserve function signatures

[Python-Dev] PEP 318: Preserve function signatures [Python-Dev] PEP 318: Preserve function signaturesMichael Hudson mwh at python.net
Tue Mar 30 06:30:43 EST 2004
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

More information about the Python-Dev mailing list

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