mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Simplify various spots where: str() is called on something
that already is a string or the existence of the str class is checked or a check is done for str twice. These all stem from the initial unicode->str replacement.
This commit is contained in:
parent
80bfb725af
commit
5de48bdd19
9 changed files with 48 additions and 89 deletions
|
|
@ -526,7 +526,7 @@ class TestCase(unittest.TestCase):
|
|||
# and pass that on to unicode.join().
|
||||
try:
|
||||
got = " - ".join(OhPhooey(f))
|
||||
self.assertEqual(got, str("a\n - b\n - fooled you! - c\n"))
|
||||
self.assertEqual(got, "a\n - b\n - fooled you! - c\n")
|
||||
finally:
|
||||
f.close()
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue