mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Changes in anticipation of stricter str vs. bytes enforcement.
This commit is contained in:
parent
85825dc1ff
commit
39478e8528
15 changed files with 78 additions and 76 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue