[Python-Dev] SocketServer and UserDict patches

Jeremy Hylton jeremy@digicool.com
Tue, 10 Apr 2001 11:33:42 -0400 (EDT)


>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

  >> A glaring example of this is cgi.SvFormContentDict.  For such an
  >> object x, x['spam'] returns a single item but x.get('spam')
  >> returns a list of one item!

  GvR> But can you guarantee that fixing this so late in the release
  GvR> cycle won't break anybody's code?

  >> Instead, these three methods should be implemented in terms of
  >> the object's own __getitem__, __setitem__, and has_key methods.
  >> This patch makes this change.

  GvR> I'm reluctant (-0) to making this change now.

I with you, Guido.  The cgi model is complicated and widely used.
That combination means that it would be easy for users to get the
impression that x['spam'] and x.get('spam') work the way they do
intentionally.  I'm not comfortable changing the behavior of the model
without a beta release.

Jeremy