On 2014-04-21 19:35, Steven D'Aprano wrote:

Does docopt solve the Original Poster's question? If not, that advice is
not terribly helpful.

I don't pretend to fully understand the Original Poster's requirement but I believe mutual exclusivity is supported. Here's a short excerpt.
"""
Example uses brackets "[ ]", parens "( )", pipes "|" and ellipsis "..." to describe optional, required, mutually exclusive, and repeating elements.
"""


By the way, I think you mean Single Point Of Truth, not Light.

http://www.faqs.org/docs/artu/ch04s02.html

SPOT, also known as DRY (Don't Repeat Yourself), is an excellent
principle to follow, but in my experience it is often too difficult to
follow religiously.

Thanks for the correction.
I too have found it difficult but have always considered it a failure on my part when I'm forced to put it aside.
The point I was making is that docopt makes it much easier.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to