Andrew Dalke added the comment:

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.  :)

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1367711>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to