Re:What Python learned from economics
by cabalamat on Wednesday November 19, 2008 @10:45AM
(#369535)
Regarding the code:
I would say f should be a syntax error, as languages shouldn't allow a default parameter to be an expression. If people wanted that behavour, they could write:
[ Parent
| on HN ]
In Python, [] is an expression too; it is an expression that constructs an empty list and returns it.
Again, if you change this just for argument lists, you're looking at another wart.
I'm not disagreeing with you. Your logic makes sense in isolation. However, language design invariably requires this sort of tradeoff.