commit | 1ff91d95a280449cfd9c723a081cb7b19a52e758 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Sep 10 22:02:25 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Sep 10 22:02:25 2007 +0000 |
tree | c537822cc870185f7042767b7ed5ca40b7d5da50 | |
parent | 98d19dafd9c9d95338887b9e53c77ec6960918e0 [diff] |
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.