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 dalke
Recipients arigo, christian.heimes, dalke, loewis, rhettinger, tds333
Date 2008-01-12.12:27:44
SpamBayes Score 1.840709e-05
Marked as misclassified No
Message-id <1200140866.4.0.214396602035.issue1367711@psf.upfronthosting.co.za>
In-reply-to
Content
I should have added my preference.  I would like to see UserDict replaced with 
dict.  I didn't like seeing the extra import when I was doing my performance 
testing, through truthfully it's not a bit overhead.

As for future-proofing, of course when there's a change in a base class then 
there can be problems with derived classes.  When that happens, change all of 
the affected classes in the code base, and make sure to publish the change so 
third parties know about it.

Yes, there's a subtlety here that most people don't know about.  But it's not 
going to go away.

As for the evil that is 'exec':

  exec "locals().data['MACHTYPE']=1; print MACHTYPE" in {}, os.environ

gives me another way to mess things up.

A point of unit tests is to allow changes like this without worry about code 
breakage.  And it's not like other non-buggy code wasn't updated over time to 
reflect changing style and best practices.

If it's not compatible with Jython or IronPython or PyPy then ignore what I 
said, but fix Cookie and update the docs to make that clear as people do think 
that it's better to derived from dict for things like this than to derive from 
UserDict or UserDictMixin.

I can give a lightning talk about this at PyCon.  :)
History
Date User Action Args
2008-01-12 12:27:46dalkesetspambayes_score: 1.84071e-05 -> 1.840709e-05
recipients: + dalke, loewis, arigo, rhettinger, tds333, christian.heimes
2008-01-12 12:27:46dalkesetspambayes_score: 1.84071e-05 -> 1.84071e-05
messageid: <1200140866.4.0.214396602035.issue1367711@psf.upfronthosting.co.za>
2008-01-12 12:27:45dalkelinkissue1367711 messages
2008-01-12 12:27:44dalkecreate