Am 06.03.2010 03:28, schrieb Antoine Pitrou: > Le Fri, 05 Mar 2010 13:51:15 -0500, > Neal Becker <ndbeck...@gmail.com> a écrit : >> I generally enjoy argparse, but one thing I find rather >> ugly and unpythonic. >> >> parser.add_argument ('--plot', action='store_true') > > I would argue that a string is actually more Pythonic than > integers or anonymous objects repurposed as magic constants. > (I'm looking at things such as SEEK_SET and friends)
Me too. In absence of a separate symbol type, Python itself uses strings for this purpose (hence the intern()ing business). Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com