Raymond Hettinger wrote: > If it is really 0.5%, then we're fine. Just remember that PyStone is an > amazingly uninformative and crappy benchmark.
Since Armin seems to not like having to justify his patch with any performance testing, I wrote a handful of dict insertion exercises and could find no real performance impact. In the case of an exception, it was much faster, but that is because it is not inserting anything into the dictionary. IOW if it is a bad change in behavior. Previously, the exception was swallowed and it was assumed to be a new key despite the exception. This is an obscure use case that could creep up it's ugly head. class K(int): def __cmp__(self, o): raise Exception() d = {} for i in xrange(10): d[K()] = i for k in d.keys(): print d[k] Despite the incomparability, this throws no error in previous versions and the dict is still usable for the expected purpose. -- Scott Dial [EMAIL PROTECTED] [EMAIL PROTECTED] _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com