Mercurial > cpython-lru_cache-weakref
changeset 68212:0dc6a90dee21
issue 11372: use range instead of xrange
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 03 Mar 2011 05:27:17 +0000 |
| parents | 6b12d2b68f25 |
| children | a4e7fbed753c |
| files | Doc/library/argparse.rst |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Doc/library/argparse.rst Wed Mar 02 23:40:36 2011 +0000 +++ b/Doc/library/argparse.rst Thu Mar 03 05:27:17 2011 +0000 @@ -929,7 +929,7 @@ simply check against a range of values:: >>> parser = argparse.ArgumentParser(prog='PROG') - >>> parser.add_argument('foo', type=int, choices=xrange(5, 10)) + >>> parser.add_argument('foo', type=int, choices=range(5, 10)) >>> parser.parse_args('7'.split()) Namespace(foo=7) >>> parser.parse_args('11'.split()) @@ -1303,7 +1303,7 @@ >>> parser = argparse.ArgumentParser() >>> parser.add_argument( - ... 'integers', metavar='int', type=int, choices=xrange(10), + ... 'integers', metavar='int', type=int, choices=range(10), ... nargs='+', help='an integer in the range 0..9') >>> parser.add_argument( ... '--sum', dest='accumulate', action='store_const', const=sum,
