Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Sorry, this is not a bug, but working as designed. Default values for functions and methods are only created once, when the function is created, not on every call. This is a FAQ: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42227> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com