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-105566: Deprecate unusual ways of creating `typing.NamedTuple` classes by AlexWaygood · Pull Request #105609 · python/cpython Conversation
|
| return '<sentinel>' | ||
|
|
||
|
|
||
| _sentinel = _Sentinel() |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think that = object() is good enough for this case.
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 disagree. Using = object() would mean that the displayed signature would be very ugly if somebody did help(typing.NamedTuple) in the REPL
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.
Also, we'll be able to reuse the _Sentinel class when we do #105570 :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
typing.NamedTuplestyping.NamedTuple classes
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.
Successfully merging this pull request may close these issues.
Deprecate unusual ways of creatingtyping.NamedTuple classes
There was an error while loading. Please reload this page.