Changes in anticipation of stricter str vs. bytes enforcement.

This commit is contained in:
Guido van Rossum 2007-08-27 17:23:59 +00:00
parent 85825dc1ff
commit 39478e8528
15 changed files with 78 additions and 76 deletions

View file

@ -498,10 +498,12 @@ class BaseTest(unittest.TestCase):
EQ("bobobXbobob", "bobobobXbobobob", "replace", "bobob", "bob")
EQ("BOBOBOB", "BOBOBOB", "replace", "bob", "bobby")
ba = buffer('a')
bb = buffer('b')
EQ("bbc", "abc", "replace", ba, bb)
EQ("aac", "abc", "replace", bb, ba)
# XXX Commented out. Is there any reason to support buffer objects
# as arguments for str.replace()? GvR
## ba = buffer('a')
## bb = buffer('b')
## EQ("bbc", "abc", "replace", ba, bb)
## EQ("aac", "abc", "replace", bb, ba)
#
self.checkequal('one@two!three!', 'one!two!three!', 'replace', '!', '@', 1)