On Wed, 15 May 2013, Henry Leyh wrote:
Yes, I was trying that and it sort of works with strings if I use something sufficiently improbable like "__UNSELECTED__" as default. But it gets difficult with boolean or even number arguments where you just may not have valid "improbable" defaults. You could now say, so what, it's the default anyway. But in my program I would like to distinguish between given and not given arguments rather than between default and non-default.

Have you looked into docopt? It's pretty awesome, and might really help in this case.

HTH,
-W
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to