Message320685
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'] |
|
Date |
User |
Action |
Args |
2018-06-28 19:47:30 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, benjamin.peterson, lukasz.langa, jreese |
2018-06-28 19:47:30 | serhiy.storchaka | set | messageid: <1530215250.03.0.56676864532.issue33983@psf.upfronthosting.co.za> |
2018-06-28 19:47:30 | serhiy.storchaka | link | issue33983 messages |
2018-06-28 19:47:29 | serhiy.storchaka | create | |
|