[docs] Bug in documentation for argparse type.
iannucci at google.com
Fri May 24 22:50:09 CEST 2013
In the very first example for argparse type, there's a type being set to
'open' (the python builtin). However, immediately following that, the
documentation suggests using argparse.FileType instead.
While open technically works for type (for read-only files), it may make
sense for the first example to demonstrate the 'right' way so users aren't
tempted to do type=lambda x: open(x, 'w') instead of argparse.FileType('w').
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs