On Wed, Sep 28, 2016 at 6:46 PM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> Lawrence D’Oliveiro <lawrenced...@gmail.com>:
>
>> On Wednesday, September 28, 2016 at 6:51:17 PM UTC+13, ast wrote:
>>> I noticed that searching in a set is faster than searching in a list.
>>
>> That’s why we have sets.
>
> I would have thought the point of sets is to have set semantics, just
> like the point of lists is to have list semantics.

And set semantics are what, exactly? Membership is a primary one.
"Searching in a set" in the OP's language is a demonstration of the
'in' operator, a membership/containment check.

(Other equally important set semantics include intersection and union,
but membership inclusion checks are definitely up there among primary
purposes of sets.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to