[issue2144] os.environ should inherit dict
Raymond Hettinger
report at bugs.python.org
Sun Feb 24 01:51:26 CET 2008
Raymond Hettinger added the comment:
The builtins make direct calls to their own internal methods. This has
existed for a long time. It would be hard to change without crushing
performance. Changing it violates Meyer's open-closed principle. And
changing it also introduces weird, unexpected behaviors (i.e. a
seemingly innocent method override can break pickling for an object --
we had a bug report on this once for dicts and sets). Also, making
these kind of changes makes it *much* harder for a builtin to guarantee
that it invariants are maintained and opening the door for segfaults.
----------
nosy: +rhettinger
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2144>
__________________________________
More information about the Python-bugs-list
mailing list