On 02/12/15 01:02, Steven D'Aprano wrote:
On Tue, 1 Dec 2015 08:15 pm, Grobu wrote:# ------------------------------------------------- >>> def test(arg=[0]): ... print arg[0] ... arg[0] += 1Awesome!
Hideous!
using a mutable default as static storage.
Exposing something a caller can override as a local, static, supposedly "private" value is IMHO a tad ... ugly? (*)
E. (*) No I don't want to resurrect that thread. -- https://mail.python.org/mailman/listinfo/python-list