Ripped from options.py--part of Greg Ward's Optik; a more-functional-than-getopt options parser for python.

# Do the right thing with boolean values for all known Python versions.
try:
  True, False
except NameError:
  (True, False) = (1, 0)

This entry has been tagged coding, python, tips — follow a tag for an archive of related essays, weblog entries, and bookmarks.

Leave a comment





(syntax: markdown)