]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-88878: IDLE - replace type('') with str (#95792)
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 9 Aug 2022 17:42:16 +0000 (13:42 -0400)
committerGitHub <noreply@github.com>
Tue, 9 Aug 2022 17:42:16 +0000 (13:42 -0400)
Change in idlelib.browser, line 54
cherrypicked from 3680ebed7f3e529d01996dd0318601f9f0d02b4b

Lib/idlelib/browser.py

index 10d9a7261113e7e0d2fb9b84f115e367b95550e0..4fe64dced60acabb06ec349138feea333d778d51 100644 (file)
@@ -52,7 +52,7 @@ def transform_children(child_dict, modname=None):
                 # If obj.name != key, it has already been suffixed.
                 supers = []
                 for sup in obj.super:
-                    if type(sup) is type(''):
+                    if isinstance(sup, str):
                         sname = sup
                     else:
                         sname = sup.name