From: Terry Jan Reedy Date: Sun, 5 Feb 2012 19:31:16 +0000 (-0500) Subject: #13933 refine patch using 'new' builtin X-Git-Tag: v3.3.0a1~238^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a77aa69870aad71c9cfce10fbca5f1e25cb2bb95;p=thirdparty%2FPython%2Fcpython.git #13933 refine patch using 'new' builtin --- diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py index 519099033f95..4e173252d615 100644 --- a/Lib/idlelib/AutoComplete.py +++ b/Lib/idlelib/AutoComplete.py @@ -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: