News for hackers. Stuff that matters.
Re:Python: Common Newbie Mistakes, Part 1 by t1m on Sunday July 07, 2013 @09:10AM (#6001913)
Note that tuples are immutable in python. I usually use tuples as default values for collections:

def f(x=()): x = list(x) ...

def g(y=(())) y = dict(y) ...

f() is the pattern for lists, g() is for dicts. Note that you can pass in regular lists to f() and regular dicts to g().

There are no comments on this comment yet.