True == 1 weirdness

Random832 random832 at fastmail.com
Thu Sep 17 02:10:44 EDT 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