Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-118761: Fix star-import of ast
  • Loading branch information
AA-Turner committed Apr 2, 2025
commit 165ecc95f871fb0a3722862779d71300889af96f
5 changes: 3 additions & 2 deletions Lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__() - {'sys'}) # don't include modules in __all__

def __getattr__(name):
if name == 'unparse':
Expand Down