19 Feb
2013
19 Feb
'13
5:51 p.m.
Why not:
parser.add_argument('--spam', default=os.environ.get('SPAM', 7))
Mainly because then you can't swap in different dictionaries to resolve SPAM (when specifying "env" to ArgumentParser). The other reason is that it's making common code shorter, which is a win IMO.