Perhaps you could use a parameter's default value to implement your static variable?

Like :
# -------------------------------------------------
>>> def test(arg=[0]):
...     print arg[0]
...     arg[0] += 1
...
>>> test()
0
>>> test()
1
# -------------------------------------------------

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to