On 5 December 2015 at 20:30, Noufal Ibrahim KV <nou...@nibrahim.net.in> wrote:
> On Sat, Dec 05 2015, Gora Mohanty wrote:
>
>
> [...]
>
>> Maybe because that was the historical way that C did it? I agree that
>> the Python 3 exception makes more sense.
>
> [...]
>
> We can only guess but you'll have to explicitly code this in and I can't
> think of any situation where it would make sense.

Well, one could make an argument that it should always be possible to
compare two objects, and at least earlier programmers would be used to
C's comparison.

Also, if one considers constant strings, these are often stored as per
a hash, so that equal strings would end up in the same memory
location, and compare equal. However, I don't think even C guarantees
such an implementation.

Regards,
Gora
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to