True == 1 weirdness

Random832 random832 at
Thu Sep 17 08:10:44 CEST 2015

On Wed, Sep 16, 2015, at 21:25, Steven D'Aprano wrote:
> So what? The intended purpose of `is` and `==` is not to return True. It
> is
> to perform a comparison which may return False, or True.

Yeah, but there's no point in doing a comparison unless you're doing it
in a context where it *might* return true. Semantics matter.

More information about the Python-list mailing list