GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TypedDict alternative definition syntax with keyword args is confusing · Issue #981 · python/typing

TypedDict alternative definition syntax with keyword args is confusing #981

New issue
Copy link
New issue
Copy link
Closed
python/cpython
#31126
python/cpython#31126
Closed
TypedDict alternative definition syntax with keyword args is confusing#981
python/cpython
#31126
Copy link
Labels
topic: otherOther topics not coveredOther topics not covered

Description

@97littleleaf11
97littleleaf11
opened on Dec 17, 2021
Issue body actions

Originally opened in https://bugs.python.org/issue46066.
Related discussion: python/mypy#2492

According to the documentation, there are two additional equivalent syntax for TypedDict definition:

Point2D = TypedDict('Point2D', x=int, y=int, label=str)
Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

However, the former one is quite confusing since we have the total keyword arg for TypedDict. In addition, PEP589 doesn't have this syntax.

I think we could just deprecated it and remove it from the doc.

Reacted by Alex Waygood, Shantanu, Eric Traut, Mathias Sven, Richard Si and Sergei Lebedev

Activity

  1. 97littleleaf11
    added
    topic: otherOther topics not coveredOther topics not covered
    on Dec 17, 2021
  2. JelleZijlstra
    closed this as completedin cpython#31126on Feb 17, 2022
  3. JelleZijlstra
    added a commit that references this issue on Feb 17, 2022

    bpo-46066: Deprecate kwargs syntax for TypedDict definitions (GH-31126)

    This issue will close once commit de6043e is merged into the 'main' branch.
    de6043e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: otherOther topics not coveredOther topics not covered

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.