Alexander Belopolsky added the comment: First, if the new thread on dict behavior does not make sense, please see discussion at issue1367711 where it started. (My mistake following up here.)
Second, the ability to subclass built-in type is such a great feature, that it is a shame that doing so comes with so many caveats. The way I understand objections to issue1367711 patch is that (1) it is hard to derive from dict properly and (2) derived classes may be broken by future changes to dict. The second objection applies to UserDict derivation as much as dict derivation, only UserDict is unlikely to be touched ever in the future. As to the first objection, if the burden is that all methods have to be overriden, let os.environ lead by example and do it. UserDict is a kludge from the XX century, stdlib should stop promoting its use. Since there is so much resistance to making dict more subclass-friendly, what would you say to reimplementing DictMixin in C as say 'dict.mixin'? __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2144> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com