A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-August/047574.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 @decoratorsPhillip J. Eby pje at telecommunity.com
Tue Aug 10 22:31:16 CEST 2004
At 02:03 PM 8/10/04 -0400, Chris King wrote:
>On Tue, 10 Aug 2004 13:21:42 -0400, Phillip J. Eby
><pje at telecommunity.com> wrote:
>
> > This doesn't apply to other decorators.  For example, some decorators turn
> > a function into a property.
>
>Ew.  If you did that, you'd be declaring get properties one way (with
>decorators) and get/set properties another (using property()).

Google "property_getter", and you'll find an implementation for this:

     @property_getter
     def foo(self):
         return self.__foo

     @property_setter
     def foo(self,value):
         self.__foo = value

     @property_deleter
     def foo(self):
         del self.__foo

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