New submission from Baptiste Lepilleur <b...@users.sourceforge.net>:
In section "14.4.3.6. type" of the argparse module, the following code sample is given: >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', type=int) >>> parser.add_argument('bar', type=file) >>> parser.parse_args('2 temp.txt'.split()) Namespace(bar=<open file 'temp.txt', mode 'r' at 0x...>, foo=2) The built-in "file" used for argument 'bar' no longer exists in python 3.2. ---------- assignee: d...@python components: Documentation messages: 125834 nosy: blep, d...@python priority: normal severity: normal status: open title: argparse example use "file" instead of "open" versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10871> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com