Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Concatenating list and tuple (or tuple and list) you can write as: grandchildren = [*node.children[0].children, *node.children[1].children] The only list methods not available for tuples are mutating methods (using them with a shared empty list would be a bug), and copy() (a[:] and list(a) work with both lists and tuples). >>> sorted(set(dir(list)) - set(dir(tuple))) ['__delitem__', '__iadd__', '__imul__', '__reversed__', '__setitem__', 'append', 'clear', 'copy', 'extend', 'insert', 'pop', 'remove', 'reverse', 'sort'] ---------- _______________________________________ 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