diff --git a/Lib/ast.py b/Lib/ast.py index 8be4f68455150a..79e8d6c9c5226b 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -24,7 +24,6 @@ :copyright: Copyright 2008 by Armin Ronacher. :license: Python License. """ -import sys from _ast import * @@ -623,6 +622,7 @@ class Param(expr_context): def main(): import argparse + import sys parser = argparse.ArgumentParser() parser.add_argument('infile', nargs='?', default='-', @@ -653,8 +653,9 @@ def main(): main() def __dir__(): - dir_ = {n for n in globals() if not n.startswith('_') and n != 'sys'} - return sorted(dir_ | {'unparse'}) + return {n for n in globals() if not n.startswith('_')} | {'unparse'} + +__all__ = tuple(__dir__()) def __getattr__(name): if name == 'unparse':