Serhiy Storchaka added the comment: Good catch! Here is a patch which fixes this issue too.
> (1) stop calling the user-defined functions and behave similarly to most > other built-in types; This is done in 3.x. > (2) stop trying to mutate that poor string in-place and always just create a > new one. The patch can be simplified by removing 6 lines. But this will slow down integer formatting by few (about 2-7) percents in worst case. Not a big deal. ---------- Added file: http://bugs.python.org/file37215/issue11145_3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11145> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com