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 — gh-116126: Implement PEP 696 by JelleZijlstra · Pull Request #116129 · python/cpython Conversation
|
|
This should be ready for review now, I'll take it out of draft once the tests pass. Notes:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will review this weekend |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pablogsal have you had a chance to look at this? The grammar changes should be quite straightforward, so hopefully it's not complicated to review. I'll spend some time today trying to make it so the field is called "default" not "default_" in Python, because having "default_" in the Python-visible APIs would be ugly. |
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.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would say "is not the typing.NoDefault singleton" rather than "is not equal to typing.NoDefault", since we usually argue that an identity check is more idiomatic for singleton objects such as None, NotImplemented and Ellipsis
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.
| >>> T.__default__ is typing.NoDefault | ||
| True | ||
| >>> S = TypeVar("S", default=None) | ||
| >>> S.__default__ is None | ||
| True |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| >>> T.__default__ is typing.NoDefault | |
| True | |
| >>> S = TypeVar("S", default=None) | |
| >>> S.__default__ is None | |
| True | |
| >>> T.has_default() | |
| False | |
| >>> T.__default__ is typing.NoDefault | |
| True | |
| >>> S = TypeVar("S", default=None) | |
| >>> S.has_default() | |
| True | |
| >>> S.__default__ is None | |
| True |
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.
I thought of that but it felt out of place in the docs for NoDefault, since the cases you added don't use NoDefault at all.
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.
Fair enough -- I thought it was quite nice to see together in one example how the two concepts interrelate, but I definitely don't feel strongly!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
|
@ericsnowcurrently the C globals check is failing because this PR now adds a new static type and global singleton, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For now let's just whitelist the new singleton, as long as it is stateless and immortal. We can circle back later if the whitelist is a problem. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit 5f6fdfd 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The previous logic would add the size of the pointer target to the pointer value, which might point to another pointer being used as a scope key. Now, we increment the value as an integer instead, which means it can never be a valid pointer.
Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Shantanu <[email protected]>
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.