[issue46754] Improve Python Language Reference based on [Köhl 2020]

Guido van Rossum report at bugs.python.org
Wed Feb 23 16:53:16 EST 2022


Guido van Rossum <guido at python.org> added the comment:

A few examples of issues brought up by Kohl:

- While the PLR explicitly states that “x < y calls x.__lt__(y)”
  [20, §3.3.1.] this is actually false.
  There are cases where x < y does not call x.__lt__(y)
  and there are other cases where x.__lt__(y) is called
  but more than that happens.

- If no expression is provided, the PLR states that
  “the last exception that was active in the current scope”
  should be re-raised. Unfortunately, the PLR stays
  unspecific on what it means for an exception to be
  “the last exception that was active in the current scope.
  [...]
  Instead, raise re-raises the exception that *is active*
  in the respective execution context

(Perhaps unrelated, but indicative of how out of date the PLR is: in executionmodel.rst there's still a mention of and even an index entry for restricted execution, a feature that was removed in some early Python 2 release.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46754>
_______________________________________


More information about the Python-bugs-list mailing list