[Python-checkins] cpython (3.2): #13933 refine patch using 'new' builtin

terry.reedy python-checkins at python.org
Sun Feb 5 20:33:25 CET 2012


http://hg.python.org/cpython/rev/d8f988b0c959
changeset:   74797:d8f988b0c959
branch:      3.2
parent:      74792:4017f305d689
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sun Feb 05 14:31:16 2012 -0500
summary:
  #13933 refine patch using 'new' builtin

files:
  Lib/idlelib/AutoComplete.py |  6 ++----
  1 files changed, 2 insertions(+), 4 deletions(-)


diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -190,8 +190,7 @@
                     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 @@
                         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:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list