[development doc updates]

Bengt Richter bokr at oz.net
Sat Aug 24 04:50:31 CEST 2002


On Fri, 23 Aug 2002 16:58:08 -0400, Tim Peters <tim.one at comcast.net> wrote:

>[Bengt Richter]
>> Nice to have a set type ;-)
>
>Yes, it is!
>
>> Is there an efficient s1==s2 test?
>
>Yes.  It's spelled s1 == s2, BTW (likewise s1 != s2).
>
>> Or should one take that for granted?
>
>No, it takes effort to do that efficiently.  Indeed, "rich comparisons" were
>implemented a few releases back in part so that objects *could* do something
>extra-efficient for specific comparison operations, and the implementation
>of dict comparison was changed soon after to exploit that for "==" and "!=".
>
>> not (s1&s2).issubset(s1|s2) ??
>
>You can if you're crazy <wink>.

Well, it's all I could concoct from what was on the page at

    http://www.python.org/dev/doc/devel/whatsnew/intro.html

and the operators on the page at

    http://www.python.org/peps/pep-0218.html

so perhaps == and != should be included in the docs as operators? ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list