A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-April/111017.html below:

[Python-Dev] PyObject_RichCompareBool identity shortcut

[Python-Dev] PyObject_RichCompareBool identity shortcutHrvoje Niksic AVL HR hrvoje.niksic at avl.com
Thu Apr 28 10:23:15 CEST 2011
On 04/28/2011 04:31 AM, Stephen J. Turnbull wrote:
> Are you saying you would expect that
>
>>>>  nan = float('nan')
>>>>  a = [1, ..., 499, nan, 501, ..., 999]    # meta-ellipsis, not Ellipsis
>>>>  a == a
> False
>
> ??

I would expect l1 == l2, where l1 and l2 are both lists, to be 
semantically equivalent to len(l1) == len(l2) and all(imap(operator.eq, 
l1, l2)).  Currently it isn't, and that was the motivation for this thread.

If objects that break reflexivity of == are not allowed, this should be 
documented, and such objects banished from the standard library.

Hrvoje
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4