in advance if so).
Little demo illustrates:
.... y[1] = y[1] + 1>>def x(y = {1:1}):
.... print y[1]
....
2>>x()
3>>x()
and so on; y continues to be updated rather than reset each call to x().
dir() suggests that y did _not_ somehow get into the global namespace, nor do
I see anything else that explains the behavior obviously. This only occurs
with dicts (or rather, possibly with any object that is merely updated within
x(), rather than reassigned within x()... I haven't tested).
I've been pythoning for a little while now, but haven't participated in this
usenet; you're welcome to consider me a newbie and be gentle with any
explanation of my oversight or whatever. The nature of this problem made it
difficult for me to investigate - to see if anyone else has reported or
explained it.
TIA.