> From: Guido van Rossum [mailto:guido@python.org] >=20 > > I would prefer to think of this is a useful feature rather than a > > wart. Finally we can have true constants! >=20 > Yuck. If you want that, define a property-like class that doesn't > allow setting. >=20 > 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). Sorry - missing smiley there ;) But see my other post for a potentially useful side-effect of this. Not = something I think should be done, but fun to think about. The idea is that you shouldn't be able to create a subclass without some = really nasty work, as the only way to get it is to determine what module = the module subclass is defined in, then grab the class out of that. But it's a horrible hack and I should never have suggested it ;) Tim Delaney
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