[Python-Dev] slots and default values (original) (raw)
Guido van Rossum guido@python.org
Tue, 13 May 2003 17:38:10 -0400
- Previous message: [Python-Dev] __slots__ and default values
- Next message: [Python-Dev] __slots__ and default values
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/)
- Previous message: [Python-Dev] __slots__ and default values
- Next message: [Python-Dev] __slots__ and default values
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]