bpo-33983: Make lib2to3.pytree.Base.children a list by amyreese · Pull Request #7977 · python/cpython
Conversation
The type difference between Base/Leaf (a tuple) and Node (a list)
makes it difficult to type check functions that take both, because
lists can be used in ways that tuples can't.
The type difference between Base/Leaf (a tuple) and Node (a list) makes it difficult to type check functions that take both, because lists can be used in ways that tuples can't.
Unfortunately this patch has lingered for years. In 3.11, lib2to3 was marked as deprecated, so I think it no longer makes sense to change this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters