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

@ -3734,11 +3734,7 @@ def _test():
root = Tk()
text = "This is Tcl/Tk version %s" % TclVersion
if TclVersion >= 8.1:
try:
text = text + str("\nThis should be a cedilla: \347",
"iso-8859-1")
except NameError:
pass # no unicode support
text += "\nThis should be a cedilla: \xe7"
label = Label(root, text=text)
label.pack()
test = Button(root, text="Click me!",