[issue28617] Why isn't "in" called a comparison operation?

2017-11-16 Thread Nick Coghlan
Nick Coghlan added the comment: Also see https://bugs.python.org/issue32055 regarding the prospect of bringing the implementation into line with the intuitive semantics, and preventing implicit comparison chaining for containment tests. -- nosy: +ncoghlan

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread wim glenn
New submission from wim glenn: Regarding https://docs.python.org/3/library/stdtypes.html#comparisons There is a line at the bottom claiming: > Two more operations with the same syntactic priority, in and not in, are > supported only by sequence types (below). The claim is incorrect beca

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread R. David Murray
R. David Murray added the comment: It should really say "only by types that support iteration". They are not comparison operations, they are containment predicates. -- nosy: +r.david.murray ___ Python tracker ___

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread wim glenn
wim glenn added the comment: Well, that wouldn't be true either. Because you can easily implement objects which support membership tests but don't support iteration. -- ___ Python tracker

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread wim glenn
wim glenn added the comment: I want to add that the grammar explicitly mentions them as comparisons https://docs.python.org/3/reference/grammar.html And they are also listed in the comparisons section of the expressions documentation https://docs.python.org/3/reference/expressions.htm

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: At a grammar and implementation level, the "in" and "not in" operators are treated like comparisons (same precedence and opcodes), but at a semantic level, I concur with David Murray and don't think of these as being comparisons at all. Accordingly, I pre

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread wim glenn
wim glenn added the comment: Perhaps it's better to call a spade a spade here - if they're implemented as comparisons, then why not document them as comparisons? A colleague has mentioned one point that sets `in` and `not in` apart from the other comparisons in the table: comparisons are gener

[issue28617] Why isn't "in" called a comparison operation?

2016-11-04 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: "in" and "not in" are not comparisons, regardless of implementation mechanics (which could change). They aren't really dependent on iteration, though they often correlate with iteration. I'd rather see them described as "containment tests" or something si

[issue28617] Why isn't "in" called a comparison operation?

2016-11-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: newpatch.diff looks fine. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue28617] Why isn't "in" called a comparison operation?

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: "Two more operations with the same syntactic priority, in and not in, are supported ..." could be changed to The containment tests in and not in have the same priority as comparisons and are supported ..." -- nosy: +terry.reedy stage: -> commit revi

[issue28617] Why isn't "in" called a comparison operation?

2016-12-05 Thread wim glenn
wim glenn added the comment: 1 month later.. is newpatch.diff OK to merge or any further improvements needed? thanks -- ___ Python tracker ___ _

[issue28617] Why isn't "in" called a comparison operation?

2020-01-08 Thread wim glenn
Change by wim glenn : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue28617] Why isn't "in" called a comparison operation?

2018-09-06 Thread wim glenn
Change by wim glenn : -- pull_requests: +8545 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list maili

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that "types that are :term:`iterable` or implement the :meth:`__contains__` method" is too low-level for this section. In this section we tell about builtin types. From those the types that support `in` and `not in` are list, tuple, dict, set, froz

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread miss-islington
miss-islington added the comment: New changeset 08bcf647d8a92e4bd47531588b284c6820b7a7ef by Miss Islington (bot) (wim glenn) in branch 'master': bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086) https://github.com/python/cpython/commit/08bcf647d8a92e4b

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +8613 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +8612 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread miss-islington
miss-islington added the comment: New changeset 3e648f8371e342ccfa663ad77e82a538fcc8c9fb by Miss Islington (bot) in branch '3.7': bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086) https://github.com/python/cpython/commit/3e648f8371e342ccfa663ad77e82a53

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread miss-islington
miss-islington added the comment: New changeset 889f080a4d5cdb1cfb901b953f4b89f3ea806bbe by Miss Islington (bot) in branch '3.6': bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086) https://github.com/python/cpython/commit/889f080a4d5cdb1cfb901b953f4b89f

[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Humm, why the bot merges in the master branch? -- ___ Python tracker ___ ___ Python-bugs-list m