diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 21:38:39 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 21:38:39 (GMT) |
commit | 5de48bdd195b14426c772b4c61290aef7f33e3ec (patch) | |
tree | e4411088f62f76b183b18d543b4c4b64d4076d65 /Lib/lib-tk | |
parent | 80bfb725af0809308264d526ac6a024fc8386643 (diff) | |
download | cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.zip cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.gz cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.bz2 |
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.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 6b360fe..1426357 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -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!", |