[issue25615] Document unsorted behaviour of glob.glob
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Dave Jones: As suggested in issue 21748, this is a minor documentation change to make explicitly clear that glob.glob returns unsorted results (on the basis that the existing specification references shell behaviour which is always sorted). ---------- assignee: docs@python components: Documentation files: glob-spec-unsorted.patch keywords: patch messages: 254597 nosy: Dave Jones, docs@python priority: normal severity: normal status: open title: Document unsorted behaviour of glob.glob type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file41029/glob-spec-unsorted.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Martin Panter added the comment: Looks good to me. Also worth applying to earlier versions I think. ---------- nosy: +martin.panter stage: -> patch review versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Dave Jones added the comment: Sounds good; the patch seems to apply cleanly to checkouts of 2.7, 3.4, and 3.5 so I'm assuming I don't need to do anything else? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Raymond Hettinger added the comment: +1 for the doc update. For future reference, the doc patches are much easier to review if you don't rewrap the text (we can easily do that part before applying the patch). ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Dave Jones added the comment: Ah, sorry about that - force of habit. I did wonder if it was preferable to have a nicely wrapped patch, or to have a clean diff but obviously figured wrong! I'll know for future :) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Roundup Robot added the comment: New changeset fa4f0096b719 by Martin Panter in branch '2.7': Issue #25615: Document unsorted behaviour of glob; patch by Dave Jones https://hg.python.org/cpython/rev/fa4f0096b719 New changeset 7ca6a13db0e5 by Martin Panter in branch '3.4': Issue #25615: Document unsorted behaviour of glob; patch by Dave Jones https://hg.python.org/cpython/rev/7ca6a13db0e5 New changeset f928dcb448a9 by Martin Panter in branch '3.5': Issue #25615: Merge glob doc from 3.4 into 3.5 https://hg.python.org/cpython/rev/f928dcb448a9 New changeset a6bc96c2b8be by Martin Panter in branch 'default': Issue #25615: Merge glob doc from 3.5 https://hg.python.org/cpython/rev/a6bc96c2b8be ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Martin Panter added the comment: I committed the patch as it was. But normally I do try to keep the number of lines in the diff close to the minimum, even when committing. RST files are like source code and it doesn’t matter if the wrapping is not 100% perfect, because they get turned into HTML or whatever anyway. Plus keeping the diff to a minimum helps when looking through the repository history with annotate or whatever. On the other hand, for doc strings, I think it is best to rewrap them, because that is the wrapping you end up with in pydoc and help(). ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Martin Panter <vadmium+py@gmail.com>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25615> _______________________________________
participants (4)
-
Dave Jones
-
Martin Panter
-
Raymond Hettinger
-
Roundup Robot