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/057351.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?Antoine Pitrou solipsis at pitrou.net
Sun Oct 16 16:08:09 CEST 2005
>    class Demo(object):
>       @def_property
>       class test:
>           """This is a test property"""
>           def get(self):
>               print "Getting attribute on instance"
>           def set(self, value):
>               print "Setting attribute on instance"
>           def delete(self):
>               print "Deleting attribute on instance"

The code looks like "self" refers to a test instance, but it will
actually refer to a Demo instance. This is quite misleading.



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