]> granicus.if.org Git - python/commit
Patch # 1140 (my code, approved by Effbot).
authorGuido van Rossum <guido@python.org>
Mon, 10 Sep 2007 22:02:25 +0000 (22:02 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Sep 2007 22:02:25 +0000 (22:02 +0000)
commit1ff91d95a280449cfd9c723a081cb7b19a52e758
treec537822cc870185f7042767b7ed5ca40b7d5da50
parent98d19dafd9c9d95338887b9e53c77ec6960918e0
Patch # 1140 (my code, approved by Effbot).

Make sure the type of the return value of re.sub(x, y, z) is the type
of y+x (i.e. unicode if either is unicode, str if they are both str)
even if there are no substitutions or if x==z (which triggered various
special cases in join_list()).

Could be backported to 2.5; no need to port to 3.0.
Lib/test/test_re.py
Modules/_sre.c