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-May/035602.html below:

[Python-Dev] __slots__ and default values

[Python-Dev] __slots__ and default values [Python-Dev] __slots__ and default valuesGuido van Rossum guido@python.org
Tue, 13 May 2003 17:38:10 -0400
> I would prefer to think of this is a useful feature rather than a
> wart. Finally we can have true constants!

Yuck.  If you want that, define a property-like class that doesn't
allow setting.

These "constants" of yours are easily subverted by defining a subclass
which adds an instance __dict__ (any subclass that doesn't define
__slots__ of its own does this).

--Guido van Rossum (home page: http://www.python.org/~guido/)



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