Consider this in Python 3.1:

>>> def f(a=42):
...     return a
...
>>> f()
42
>>> f.__defaults__ = (23,)
>>> f()
23


Is this an accident of implementation, or can I trust that changing 
function defaults in this fashion is guaranteed to work?



-- 
Steven

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

Reply via email to