[issue32118] Doc for comparison of sequences with non-orderable elements

2017-11-27 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: I like Terry's suggestion much better. I've closed my GitHub PR in favor of Terry's change. My only suggested tweak might be throwing in something like "(e.g." None)", perhaps e.g. "Instances of an unordered class

[issue32118] Docs: add note about sequence comparisons containing non-orderable elements

2017-11-22 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: The PR includes an unrelated one word grammar fix in the same file, that can be removed (by me or by someone else, IDC). This is possibly backportable but I wouldn't know, and leave such decisions for someone who do. -

[issue32118] Docs: add note about sequence comparisons containing non-orderable elements

2017-11-22 Thread Dubslow
New submission from Dubslow <buns...@gmail.com>: In sequence comparisons, the enforcement of reflexivity of elements means that only non-identical elements are actually compared. The docs then note, with example, that non-reflexive elements thus always "compare" equal insi

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: Er, in my first message, make that "(yield from tup for tup in zip_longest(*iters, usefill=False))" -- ___ Python tracker <rep...@bugs.python.org> <https://b

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: Perhaps the loop variable could be renamed to "len_minus_1" or some such something which is more semantic to the algorithm. -- ___ Python tracker <rep...@bugs.python.org> &l

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: Regarding the current bug more specifically, I think a few comments would go a long way to helping readers understand the code. And also, I do think the (1, +1, -1) is less readable, simply because it doesn't follow the most common usage pa

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow <buns...@gmail.com> added the comment: Note that this follows a bit of discussion on python-ideas, in two threads: https://mail.python.org/pipermail/python-ideas/2017-November/047920.html https://mail.python.org/pipermail/python-ideas/2017-November/047989.html I agree the zip_l