This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, benjamin.peterson, georg.brandl, loewis, rhettinger, vdupras
Date 2008-02-24.01:13:04
SpamBayes Score 0.012493484
Marked as misclassified No
Message-id <1203815586.31.0.574973162203.issue2144@psf.upfronthosting.co.za>
In-reply-to
Content
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'?
History
Date User Action Args
2008-02-24 01:13:06belopolskysetspambayes_score: 0.0124935 -> 0.012493484
recipients: + belopolsky, loewis, georg.brandl, rhettinger, benjamin.peterson, vdupras
2008-02-24 01:13:06belopolskysetspambayes_score: 0.0124935 -> 0.0124935
messageid: <1203815586.31.0.574973162203.issue2144@psf.upfronthosting.co.za>
2008-02-24 01:13:05belopolskylinkissue2144 messages
2008-02-24 01:13:04belopolskycreate