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/2003-January/032354.html below:

[Python-Dev] Extended Function syntax

[Python-Dev] Extended Function syntaxRaymond Hettinger python@rcn.com
Wed, 22 Jan 2003 18:28:43 -0500
> Using the new syntax along with special metaclass support, properties
> and static and class methods could be declared like this::
> 
>     class MyClass(object):
>         def class myClassMethod(cls): . . .
>         def static myStaticMethod(): . . .

This syntax is clear, explicit, and attractive.


>         def get myProperty(self): . . .
>         def set myProperty(self, value): . . .

This ibe doesn't extend as cleanly:

           def del myProperty(self, value):
                 "Oops, del is a keyword"

          def doc myProperty ... ? what goes here

Also, can two properties share a getter or setter as
they can now?

    x = property(notifyOneWay, setx)
    y = propetry(notifyOneWay, sety)


Raymond Hettinger



#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################



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