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 jimjjewett
Date 2006-12-19.22:26:53
SpamBayes Score
Marked as misclassified
As I understand it, the problem is that dict.update is assuming any dict subclass will use the same internal data representation.

Restricting the fast path to exactly builtin dicts (not subclasses) fixes the bug, but makes the fallback more frequent.

The existing fallback is to call keys(), then iterate over it, retrieving the value for each key.  (keys is required for a "minimal mapping" as documented is UserDict, and a few other random places.)

The only potential dependency on other methods is his proposed new intermediate path that avoids creating a list of all keys, by using iterkeys if it exists.  (I suggested using iteritems to avoid the lookups.)  If iter* aren't implemented, the only harm is falling back to the existing fallback of "for k in keys():"
Date User Action Args
2007-08-23 15:55:43adminlinkissue1615701 messages
2007-08-23 15:55:43admincreate