Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Hi Rose, this is a FAQ:

https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects

although it's also a feature that does cause beginners some trouble, see for 
example my comment here for more information:

https://bugs.python.org/msg361451

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42379>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to