G'day Pythoneers,

I ran into a strange problem today: why does Python not allow default
paranmeters for packed arguments in a function def?

>>> def test(a = 1, b = (2, 3)):
...     print a, b
...
>>> test()
1 (2, 3)

>>> def t(a, *b = (3, 4)):
  File "<input>", line 1
    def t(a, *b = (3, 4)):
                ^
SyntaxError: invalid syntax

What was the rationale behind this design?

Cheers,

Ching-Yun Xavier Ho, Technical Artist

Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: cont...@xavierho.com
Website: http://xavierho.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to