paul j3 added the comment: test_argparse.py has some "choices='abc'" cases.
In those should "parser.parse_args(['--foo','bc'])" be considered a success or failure? The underlying issue here is that while string iteration behaves like list iteration, string __contains__ looks for substrings, not just one character that matches. (String __contains__ also returns a TypeError if its argument is not a string.) But other than removing poor examples in documentation and tests, I'm not sure this issue requires a change. ---------- nosy: +paul.j3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16977> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com