function object.func_default off the console

Aaron Brady acb at uchicago.edu
Wed Apr 25 01:38:37 EDT 2007


>>> f.func_defaults[0]
[2, 3]
>>> f.func_defaults[0]+=[4]
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> f.func_defaults[0]
[2, 3, 4]

V. interesting.  Operation succeeds but with a throw.  Er, raise.



More information about the Python-list mailing list