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/2005-October/057453.html below:

[Python-Dev] Definining properties - a use case for class decorators?

[Python-Dev] Definining properties - a use case for class decorators? [Python-Dev] Definining properties - a use case for class decorators?skip@pobox.com skip at pobox.com
Wed Oct 19 21:22:06 CEST 2005
>>>>> "Phillip" == Phillip J Eby <pje at telecommunity.com> writes:

    Phillip> At 11:43 AM 10/19/2005 -0500, skip at pobox.com wrote:
    >> >> <callable> <name> <tuple>:
    >> >>     <definitions>
    >> ...
    >> 
    Steve> Wow, that's really neat.  And you save a keyword! ;-)
    >> 
    >> Two if you add a builtin called "function" (get rid of "def").

    Phillip> Not unless the tuple is passed in as an abstract syntax tree or
    Phillip> something.

Hmmm...  Maybe I misread something then.  I saw (I think) that

    type Foo (base):
        def __init__(self):
            pass

would be equivalent to

    class Foo (base):
        def __init__(self):
            pass

and thought that

    function myfunc(arg1, arg2):
        pass

would be equivalent to

    def myfunc(arg1, arg2):
        pass

where "function" a builtin that when called returns a new function.

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