Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
This is a operation precedence issue. The line: t0, t1 = t if t is not None else [], [] is parsed as: (t if t is not None else []), [] so you need brackets around the "else" operand to get the effect you want. t0, t1 = t if t is not None else ([], []) ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43021> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com