Skip to content

gh-104799: Default missing lists in AST to the empty list#104834

Merged
JelleZijlstra merged 7 commits intopython:mainfrom
JelleZijlstra:defaultempty
Jun 2, 2023
Merged

gh-104799: Default missing lists in AST to the empty list#104834
JelleZijlstra merged 7 commits intopython:mainfrom
JelleZijlstra:defaultempty

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 24, 2023

Motivated by #104799: avoid breaking backward compatibility with the manual creation of ast.FunctionDef nodes. Now, if a list-type field is missing, we simply default to the empty list.

This affects all AST nodes though, not just the new ones.


📚 Documentation preview 📚: https://cpython-previews--104834.org.readthedocs.build/

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants