Hacker News new | ask | show | jobs
by biorach 1114 days ago
Nah, this has been very well known since decades and is very easy to spot.
1 comments

Yeah this is covered in pretty much every style guide, tutorial, and reference. And is an easy screener in an interview. I'm also surprised anyone using Python as more than a toy experiment had this issue, especially in such a critical service.
I've worked on a lot of Python as a hobbyist and student, much of it in real world use - probably at least 100kloc - and I've never encountered this. Where is this information? I'm worried that I'm missing some other "obvious" things. I've of course run into python's shallow vs deep copies, but I don't remember default values being shared between invocations.
If you do a search for "python common gotchas" it's almost certain to come up, usually pretty prominently.