Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-105566: Deprecate unusual ways of creatingtyping.NamedTuple classes#105609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AlexWaygood merged 3 commits intopython:mainfromAlexWaygood:nmdtpl-depr
Jun 14, 2023

Conversation

AlexWaygood
Copy link
Member

@AlexWaygoodAlexWaygood commentedJun 9, 2023
edited by github-actionsbot
Loading

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good cleanup!

AlexWaygood reacted with rocket emoji
return '<sentinel>'


_sentinel = _Sentinel()
Copy link
Member

Choose a reason for 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.

Copy link
MemberAuthor

Choose a reason for 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 didhelp(typing.NamedTuple) in the REPL

Copy link
MemberAuthor

Choose a reason for 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 :)

@AlexWaygoodAlexWaygood changed the titlegh-105566: Deprecate unusual ways of constructingtyping.NamedTuplesgh-105566: Deprecate unusual ways of creatingtyping.NamedTuple classesJun 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sobolevnsobolevnsobolevn left review comments

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@Fidget-SpinnerFidget-SpinnerAwaiting requested review from Fidget-Spinner

Assignees
No one assigned
Labels
topic-typingtype-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Deprecate unusual ways of creatingtyping.NamedTuple classes
4 participants
@AlexWaygood@JelleZijlstra@sobolevn@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp