[issue11354] argparse: nargs could accept range of options count

2011-03-01 Thread Daniel Haertle
Daniel Haertle added the comment: Hi Wojciech, in your tests, at def test_add_argument10(self): "nargs = (0, 1) => optimized to '?'" opt = self.add_argument(1, None) self.assertEqual(opt.nargs, argparse.ONE_OR_MORE) you should change &q

[issue11360] In documentation of getopt, advertise argparse instead of optparse

2011-03-01 Thread Daniel Haertle
New submission from Daniel Haertle : At the beginning of http://docs.python.org/dev/library/getopt.html the line "A more convenient, flexible, and powerful alternative is the optparse module." routes the user to optparse. Since optparse is deprecated in favor of argparse, this line

[issue5419] urllib.request.open(someURL).read() returns a bytes object so writing it requires binary mode

2010-04-15 Thread Daniel Haertle
Daniel Haertle added the comment: I got struck by the same feature. In addition, currently the docs are wrong in the examples (at http://docs.python.org/dev/py3k/library/urllib.request.html#examples the output of f.read() is a string instead of bytes). There I propose the change from