[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: Tracking which group the grouper _should_ be on using an incrementing integer seems to work pretty well. In additional to the tests in `test_itertools.py`, I've gotten the following tests to pass: class TestGroupBy(unittest.TestCase): def test_unpa

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: Oops. You don't need to pass `self.currvalue` to `_grouper`. I didn't end up using it in there... -- ___ Python tracker <http://bugs.python.o

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: I think that works to solve the problem that I pointed out. In my stack overflow question (http://stackoverflow.com/a/43926058/748858) it has been pointed out that there are other opportunities for weirdness here. Specifically, if if I skip processing 2

[issue27470] -3 commandline option documented differently via man

2016-07-08 Thread Matthew Gilson
New submission from Matthew Gilson: The man page for python says: > Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. The official documentation (https://docs.python.org/2/using/cmdline.html#cmdoption-3) does not mention 2to3 at all: > Warn about Python 3.x po

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Matthew Gilson added the comment: This originally came up on stackoverflow: http://stackoverflow.com/questions/24200988/modify-url-components-in-python-2/24201020?noredirect=1#24201020 Would it be helpful if I also added a simple example to the docs as in the example there

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Matthew Gilson added the comment: Sorry, forgot to remove the mention of BaseResult ... -- Added file: http://bugs.python.org/file35613/python_doc_patch.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
Changes by Matthew Gilson : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issu

[issue21746] urlparse.BaseResult no longer exists

2014-06-13 Thread Matthew Gilson
New submission from Matthew Gilson: The BaseResult has been replaced by namedtuple. This also opens up all of the documented methods on namedtuple which would be nice to have as part of the API. I've taken a stab and re-writing the docs here. Feel free to use it (or

[issue19934] collections.Counter.most_common does not document `None` as acceptable input.

2013-12-08 Thread Matthew Gilson
Matthew Gilson added the comment: This is a very simple patch which addresses the issue. I am still curious whether the reported function signature should be changed from: .. method:: most_common([n]) to: .. method:: most_common(n=None) . Any thoughts? Also, while I was in there

[issue19934] collections.Counter.most_common does not document `None` as acceptable input.

2013-12-08 Thread Matthew Gilson
New submission from Matthew Gilson: Reading the source for collections.Counter.most_common, the docstring mentions that `n` can be `None` or omitted, but the online documentation does not mention that `n` can be `None`. -- assignee: docs@python components: Documentation messages