Guido van Rossum wrote: > Aahz: >> >> It's a constant. The BCD module is Binary Coded Decimal; instances are >> intended to be as immutable as strings and numbers (well, it *is* a >> number type). Modifying an instance is guaranteed to produce a new >> instance. To a large extent, I guess I feel that if a class is intended >> to be immutable, each of its underlying data attributes should also be >> immutable. > > Or you could assign it to a private variable. And in private e-mail, Guido writes: > > I hate to continue harping on this tiny item in public, but what woud > you do if you needed a constant dictionary? <grin> <throw up hands> All right, I guess it's time for me to just follow the Python motto: "There's only one way, and that way is Guido's." -- --- Aahz (@pobox.com) Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ Androgynous poly kinky vanilla queer het Pythonista We must not let the evil of a few trample the freedoms of the many.
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