| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
- Specify that the runtime __getitem__ does not validate subscriptions, and return a new types.FunctionGenericAlias subclass - Type checking rules: same as generic classes (ParamSpec, TypeVarTuple, *tuple for a single TypeVarTuple), unused and unsolvable type parameters, PEP 696 defaults, generic Callable values, version gating - Overloads: per-overload filtering from the mypy prototype, and a consistency rule for the implementation's type parameters - Add Use Cases, Runtime Performance (with measurements), Rejected Ideas and Deferred Ideas; move reification to Deferred Ideas - Fix the motivation workarounds and examples, link the reference implementations, Python-Version 3.16 Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
Sorry, something went wrong.
Documentation build overview5 files changed · ± 5 modified ± Modified |
Sorry, something went wrong.
There was a problem hiding this comment.
Had a read of this all seems good to me thanks for getting the last bit over the finish line @PabloRuizCuevas
Sorry, something went wrong.
Keep it; I'll work on adding it to the prototype. (Are there any others we missed?) |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you Pablo for this tremendous upgrade, and for making your use of LLMs transparent! I like your approach to asking the LLM to present choices that you personally decide. (I've used something simpler occasionally by asking an LLM to summarize the remaining controversies in a discourse thread, but yours is more useful still!)
I am approving and merging this and announce the new version (after 3 years!) to the thread. I have some questions and feedback that I will ask separately after that's done.
There are also still some objections from Jelle and Carl to be dealt with (but there's hope).
Sorry, something went wrong.
|
@gvanrossum , glad you like it, yes let's hope it gets finally approved after such a long time :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This updates PEP 718 to answer the open points from the Discourse thread (mainly @carljm's review) and @gvanrossum's comments on @Gobot1234's commit 14882ca. It ports parts of that commit; James is credited as co-author.
Main changes
Guido's comments on 14882ca
All 11 addressed: quotes around "function objects"; reification moved to Deferred Ideas; "requested many times" softened; Foo[int]() output shown; class-only examples removed; current runtime error shown; "roots of runtime type checking" and the .T sketch dropped; blank lines fixed; foo_2 split into .py/.pyi; plain assignment instead of type X = foo_1[int].
Open question (@gvanrossum)
The spec lists types.MethodWrapperType (e.g. object().__str__) as subscriptable, but python/cpython#156201 doesn't cover it. Keep it and add support there, or drop it from the spec? The text keeps it for now.
Follow-up PR
A Motivation rewrite with real-world examples; How to Teach This and Security Implications.