Guido van Rossum schrieb: > I was looking at this too. The root cause of the test failure is that > unicode_translate() calls PyDict_Copy() on its argument dict, and then > modifies the copy to add extra keys. This seems awfully expensive. > Isn't there another way? (I'm imagining that often the dict is rather > large and the string rather short...)
I added that dict copy in order to make translate() more robust. It used to directly call PyUnicode_TranslateCharmap which simply ignores invalid entries and only accepts ordinals as keys, while allowing ordinals and strings as values. Both these points made its behavior confusing enough to warrant some extra comfort. Georg _______________________________________________ Python-3000-checkins mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000-checkins
