diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-02-05 19:31:16 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-02-05 19:31:16 (GMT) |
commit | a77aa69870aad71c9cfce10fbca5f1e25cb2bb95 (patch) | |
tree | 6a6b137f7eea92eb86ac32661f2a6a54871e6a5b | |
parent | cd2a6033ac0bafd69a7cba2d132e092127acc895 (diff) | |
download | cpython-a77aa69870aad71c9cfce10fbca5f1e25cb2bb95.zip cpython-a77aa69870aad71c9cfce10fbca5f1e25cb2bb95.tar.gz cpython-a77aa69870aad71c9cfce10fbca5f1e25cb2bb95.tar.bz2 |
#13933 refine patch using 'new' builtin
-rw-r--r-- | Lib/idlelib/AutoComplete.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py index 5190990..4e17325 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: |