bpo-33983: Make lib2to3.pytree.Base.children a list by amyreese · Pull Request #7977 · python/cpython

Conversation

@amyreese

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.

https://bugs.python.org/issue33983

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.

@JelleZijlstra

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.

Labels