Why does initializing a variable via a python default variable keep state across object instantiation?
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay
--
Chapters
00:00 Question
01:09 Accepted answer (Score 15)
01:58 Answer 2 (Score 5)
02:29 Answer 3 (Score 3)
03:08 Thank you
--
Full question
https://stackoverflow.com/questions/3887...
Answer 1 links:
["Least Astonishment" and the Mutable Default Argument]: https://stackoverflow.com/questions/1132...
http://effbot.org/zone/default-values.ht...
Answer 2 links:
[This blog post]: http://www.deadlybloodyserious.com/2008/.../
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #arguments
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay
--
Chapters
00:00 Question
01:09 Accepted answer (Score 15)
01:58 Answer 2 (Score 5)
02:29 Answer 3 (Score 3)
03:08 Thank you
--
Full question
https://stackoverflow.com/questions/3887...
Answer 1 links:
["Least Astonishment" and the Mutable Default Argument]: https://stackoverflow.com/questions/1132...
http://effbot.org/zone/default-values.ht...
Answer 2 links:
[This blog post]: http://www.deadlybloodyserious.com/2008/.../
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #arguments
#avk47