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-August/047533.html below:

[Python-Dev] Re: Re: Call for defense of @decorators

[Python-Dev] Re: Re: Call for defense of @decorators [Python-Dev] Re: Re: Call for defense of @decoratorsSkip Montanaro skip at pobox.com
Tue Aug 10 14:56:09 CEST 2004
    Walter> So how about:

    Walter> make classmethod
    Walter> def foo(cls, bar):
    Walter>     ...

I don't think anybody's come up with a candidate keyword that reads well in
most/all situations.  Consider:

    make accepts(int, (int, float))
    make returns(int)
    def foo(arg1, arg2):
        return arg1 * arg2

While you can contort "make" to mean what you want in this case it's clearly
a much different meaning ("ensure that (or force) this function to accept
and return these types) than "make classmethod" ("turn this function into a
class method").  Other potential keywords have similar problems.

Skip

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