]> granicus.if.org Git - python/commitdiff
#13933 refine patch using 'new' builtin
authorTerry Jan Reedy <tjreedy@udel.edu>
Sun, 5 Feb 2012 19:31:16 +0000 (14:31 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sun, 5 Feb 2012 19:31:16 +0000 (14:31 -0500)
Lib/idlelib/AutoComplete.py

index 519099033f95b0326fd8b3e68f33798b12e03e8a..4e173252d6150dc22e2fbf8ee272551f41ca94c4 100644 (file)
@@ -190,8 +190,7 @@ class AutoComplete:
                     bigl = eval("dir()", namespace)
                     bigl.sort()
                     if "__all__" in bigl:
-                        smalll = list(eval("__all__", namespace))
-                        smalll.sort()
+                        smalll = sorted(eval("__all__", namespace))
                     else:
                         smalll = [s for s in bigl if s[:1] != '_']
                 else:
@@ -200,8 +199,7 @@ class AutoComplete:
                         bigl = dir(entity)
                         bigl.sort()
                         if "__all__" in bigl:
-                            smalll = list(entity.__all__)
-                            smalll.sort()
+                            smalll = sorted(entity.__all__)
                         else:
                             smalll = [s for s in bigl if s[:1] != '_']
                     except: