mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -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!",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue