Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
It is okay. In this case `a |= b` is equivalent to `a = a | b`. The same behavior is for tuples, strings, and other non-mutable collections: t = (1, 2) t += (3, 4) s = 'ab' s += 'cd' And even for numbers! i = 5 i += 1 ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40702> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com