[issue1140] re.sub returns str when processing empty unicode string

Guido van Rossum report at bugs.python.org
Mon Sep 10 20:42:54 CEST 2007


Guido van Rossum added the comment:

Actually, it already implements the best possible rules, *except* for
the special case of an empty 3rd argument.  (When there are no
substitutions, it normally returns the input unchanged; but somehow an
empty input is handled with a shortcut even before that point.  It ought
to be a simlpe fix.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1140>
__________________________________


More information about the Python-bugs-list mailing list