gh-109543: Remove unnecessary hasattr check by JelleZijlstra · Pull Request #109544 · python/cpython

@JelleZijlstra

Also added a new test case covering the scenario I thought this
might be about.

@AlexWaygood

AlexWaygood

AlexWaygood

JelleZijlstra added a commit to JelleZijlstra/cpython that referenced this pull request

Sep 18, 2023
As discussed in comments to python#109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.

JelleZijlstra added a commit that referenced this pull request

Sep 27, 2023
As discussed in comments to #109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 27, 2023
As discussed in comments to pythonGH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 27, 2023
As discussed in comments to pythonGH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

JelleZijlstra added a commit that referenced this pull request

Sep 27, 2023
… (#109983)

As discussed in comments to GH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

csm10495 pushed a commit to csm10495/cpython that referenced this pull request

Sep 28, 2023
Also added a new test case covering the scenario I thought this
might be about.

csm10495 pushed a commit to csm10495/cpython that referenced this pull request

Sep 28, 2023
As discussed in comments to python#109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.

vstinner pushed a commit that referenced this pull request

Oct 4, 2023
… (#109982)

Enhance TypedDict docs around required/optional keys (GH-109547)

As discussed in comments to GH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024
Also added a new test case covering the scenario I thought this
might be about.

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024
As discussed in comments to python#109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.

Daraan added a commit to Daraan/cpython that referenced this pull request

Feb 22, 2025
In relation to python#109544 which changed this behavior.

Signed-off-by: Daniel Sperber <github.blurry@9ox.net>

Daraan added a commit to Daraan/cpython that referenced this pull request

Feb 22, 2025
In relation to python#109544 which changed this behavior.

Signed-off-by: Daniel Sperber <github.blurry@9ox.net>

Daraan added a commit to Daraan/cpython that referenced this pull request

Feb 22, 2025
In relation to python#109544 which changed this behavior.

Signed-off-by: Daniel Sperber <github.blurry@9ox.net>

Daraan added a commit to Daraan/typing_extensions that referenced this pull request

Feb 22, 2025
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Daraan added a commit to Daraan/typing_extensions that referenced this pull request

Feb 22, 2025
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Daraan added a commit to Daraan/typing_extensions that referenced this pull request

Feb 22, 2025
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

JelleZijlstra pushed a commit that referenced this pull request

Feb 22, 2025
…re is an assignment in the class body. (#130460)

In relation to #109544 which changed this behavior.

Signed-off-by: Daniel Sperber <github.blurry@9ox.net>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Feb 22, 2025
…re is an assignment in the class body. (pythonGH-130460)

In relation to pythonGH-109544 which changed this behavior.
(cherry picked from commit d8ce092)

Co-authored-by: Daraan <github.blurry@9ox.net>
Signed-off-by: Daniel Sperber <github.blurry@9ox.net>

JelleZijlstra pushed a commit that referenced this pull request

Feb 22, 2025
…hen there is an assignment in the class body. (GH-130460) (#130462)

Add test checking value of a TypedDict's __total__ attribute when there is an assignment in the class body. (GH-130460)

In relation to GH-109544 which changed this behavior.
(cherry picked from commit d8ce092)

Signed-off-by: Daniel Sperber <github.blurry@9ox.net>
Co-authored-by: Daraan <github.blurry@9ox.net>