Hacker News new | ask | show | jobs
by StavrosK 3315 days ago
In that case, by far the biggest Python gotcha is:

    def do_stuff(mylist=[]):
        mylist.append("thing")
Which will lead to the list containing N items after N invocations (i.e. the second function call won't start with an empty list).
1 comments

Yup, we see that issue too. But in that case, I think it's python specific (how python handles default values). Ruby, for example, does not have that behavior.