mardi 6 décembre 2016

Short-circuiting outcome (Python)

I came across the following statement from here:

* ``__else__`` is the short-circuiting outcome for ``if`` expressions due to
  the absence of a trailing ``else`` clause
* ``__then__`` is the short-circuiting outcome for ``else`` expressions due to
  the absence of a leading ``if`` clause

What is meant by those statements? Are there any examples that could clarify the points a bit more?

Thanks.

Aucun commentaire:

Enregistrer un commentaire