New submission from John Reese <jre...@leetcode.net>:

When type checking applications using lib2to3, the difference in types for 
lib2to3.pytree.Base.children versus Node.children makes it difficult to accept 
both leaves and nodes and programatically work with child nodes/leaves.  
Base/Leaf both have `children` defined as an empty Tuple, while Node defines it 
as an empty list.  It would be more useful for Base/Leaf to also use an empty 
list, so that the type is the same, regardless of which type of object you are 
given.

----------
components: Library (Lib)
messages: 320616
nosy: jreese, lukasz.langa
priority: normal
severity: normal
status: open
title: unify types for lib2to3.pytree.Base.children
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33983>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to