Comparisons and sorting of a numeric class....

Marko Rauhamaa marko at pacujo.net
Fri Jan 9 15:28:24 CET 2015


Chris Angelico <rosuav at gmail.com>:

> I'd have to explicitly check "if self.socket is None:".

That is the only way in Python.

Wrong:

    return f() or g() or h()

Right:

    rv = f()
    if rv is not None:
        return rv
    rv = g()
    if rv is not None:
        return rv
    return h()

> I'm not advocating making this change.

Has someone proposed a change?


Marko



More information about the Python-list mailing list