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:
Walter Dörwald 2007-06-11 21:38:39 +00:00
parent 80bfb725af
commit 5de48bdd19
9 changed files with 48 additions and 89 deletions

View file

@ -247,13 +247,8 @@ class TestCaseBase(unittest.TestCase):
cf.set("sect", "option1", mystr("splat"))
cf.set("sect", "option2", "splat")
cf.set("sect", "option2", mystr("splat"))
try:
str
except NameError:
pass
else:
cf.set("sect", "option1", str("splat"))
cf.set("sect", "option2", str("splat"))
cf.set("sect", "option1", "splat")
cf.set("sect", "option2", "splat")
def test_read_returns_file_list(self):
file1 = test_support.findfile("cfgparser.1")