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/2006-March/063150.html below:

[Python-Dev] Class decorators

[Python-Dev] Class decorators [Python-Dev] Class decoratorsGreg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 30 13:20:58 CEST 2006
Raymond Hettinger wrote:

> FWIW, I do not consider it an abuse to use a class to create a small 
> namespace. Essentially that is what it is for -- it matters not whether 
> the class has no methods.

Two problems with that:

* The word "class" in front of it is a misnomer if
   you've no intention of using it as a class.

* It's not a completely blank slate -- it comes with
   various baggage in the form of __xxx__ attributes
   (my registration function has to filter those out).
   Plus some unwanted behaviour such as being callable,
   and doing magic things with attribute access when
   the attribute is a descriptor.

--
Greg
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