GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — bpo-41559: Documentation for PEP 612 by Fidget-Spinner · Pull Request #24000 · python/cpython Conversation
|
|
@gvanrossum. Sorry, I did the reverse of what I'd initially promised - I was in a writing mood :). Really no hurry to review it though, we have a long way till 3.10 beta. This felt more difficult to write than what I did for PEP 585 and PEP 604 combined! Thinking of useful examples which were also understandable by users and copy-pastable/fully working as is wasn't easy. Maybe this is a sign that the typing module needs some refactoring work by the future Docs WG people. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hmm I wonder if we should reorder the PEP-sized what's new items while we're at it. Strange that the current order is PEP 563, 613, 604, 612. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this very thorough doc update! I have just a few nits.
Next, do you want to help fixing the support for this in mypy? There's some code, but it's not working right.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .. note:: | ||
| A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not | ||
| have correct ``__parameters__`` after substitution because | ||
| :class:`typing.ParamSpec` is intended primarily for static type checking. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add this to the note, but privately I'm interested in an example where it goes wrong?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
'''This example is from the typing module, though it will behave the same with the builtin GenericAlias''' from typing import ParamSpec, TypeVar, Generic P = ParamSpec('P') T = TypeVar('T') class X(Generic[P]): ... # Empty tuple, because T is nested inside that list print(X[int, str, T].__parameters__)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-Authored-By: Guido van Rossum <[email protected]>
You're welcome! Unfortunately I have no clue how mypy works internally, so I don't think I'm the right person for that right now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Everything else is fine now!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okay!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for taking the time to review this prosaic chunk of text. Getting this approved is an awesome way to start the new year! BTW, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.