Jelle Zijlstra <jelle.zijls...@gmail.com> added the comment:

Some specific points from the document:

"While the PLR explicitly states that “x < y calls x.__lt__(y)” [20, 3.3.1.] 
this is actually false." They had to read the implementation to actually figure 
out how this works.

"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.”"

"The description of this name binding and resolution process in the PLR [20, 
4.2.] is unfortunately not particularly clear"

"While generator objects seem not to be specified as part of the PLR, the 
documentation of the inspect module5 describes them."

(I didn't read the whole thing, but searched for "PLR".)

Here's a few similar things I noticed while reading through the reference 
recently:

- 
https://docs.python.org/3.10/reference/datamodel.html#the-standard-type-hierarchy
 is supposed to be a list of primitive types but has a few problems:
  - Lists "numbers.Number" as a standard type, when it's an ABC that's really 
not part of the core language
  - Lists "I/O objects" as a kind of standard object, but there are many kinds 
of file-like objects, and I'd argue they're not part of the core language, but 
of the standard library.
  - On the other hand, some builtin types (range, map, filter, zip) are not 
listed.
- https://docs.python.org/3.10/reference/expressions.html#subscriptions doesn't 
actually give the rules about when __class_getitem__ is called vs. __getitem__. 
That's in 
https://docs.python.org/3.10/reference/datamodel.html#class-getitem-versus-getitem.
- The text at https://docs.python.org/3.10/reference/expressions.html#calls 
doesn't cover positional-only parameters.

----------
nosy: +Jelle Zijlstra

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to