Re: namespace curiosity

2006-11-24 Thread J. Michael Caine
On Friday 24 November 2006 17:45, Dennis Lee Bieber wrote: > About once a week... It's a FAQ entry! Wonderful! Missed that. Thanks for humoring me. Very satisfying explanation, too... but what else is one to expect from Python? :) -- http://mail.python.org/mailman/listinfo/python-list

namespace curiosity

2006-11-24 Thread J. Michael Caine
I just noticed something that may well have an obvious explanation (apologies in advance if so). Little demo illustrates: >>> def x(y = {1:1}): ... y[1] = y[1] + 1 ... print y[1] ... >>> x() 2 >>> x() 3 and so on; y continues to be updated rather than reset each call to x(). dir() sug