[issue16697] argparse kwarg 'choices' documentation

2019-08-17 Thread Brendan Barnwell


Brendan Barnwell  added the comment:

This issue has sat idle for six years.  Meanwhile, the docs are still 
incorrect, giving every user wrong information about how the module works.  Can 
we consider just changing the documentation instead of worrying about what the 
behavior should be or what the rationale is?

--
nosy: +BrenBarn
versions: +Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16697] argparse kwarg 'choices' documentation

2013-01-15 Thread wim glenn

Changes by wim glenn wim.gl...@gmail.com:


--
nosy:  -wim.glenn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16697
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16697] argparse kwarg 'choices' documentation

2012-12-16 Thread wim glenn

New submission from wim glenn:

Any object that supports the in operator can be passed as the choices value, so 
dict objects, set objects, custom containers, etc. are all supported.  (from  
http://docs.python.org/dev/library/argparse.html#choices )

Actual behaviour is contradicted by the docs - it seems the container must 
additionally be iterable.  When using a custom container, argparse b0rks on 
trying to iterate through choices.  Using a metavar prevents this, but it still 
breaks on cases where the element is not in the container.  

More details here:  
http://stackoverflow.com/questions/13833566/python-argparse-choices-from-an-infinite-set

--
assignee: docs@python
components: Documentation
messages: 177599
nosy: docs@python, wim.glenn
priority: normal
severity: normal
status: open
title: argparse kwarg 'choices' documentation
type: enhancement
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16697
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16697] argparse kwarg 'choices' documentation

2012-12-16 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of issue issue 16468, which may get closed with either a 
bug fix or a doc fix, depending on the outcome of the overall discussion.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - argparse only supports iterable choices
type: enhancement - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16697
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com