This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Doug Hoskisson
Recipients Doug Hoskisson
Date 2021-08-14.18:28:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628965698.89.0.982806951929.issue44915@roundup.psfhosted.org>
In-reply-to
Content
I'm running into an issue with the syntax of https://www.python.org/dev/peps/pep-0589/

```
class C(TypedDict):
    to: int
    from: int
	
SyntaxError: invalid syntax
```

I'm not sure any change needs to be made to the specification.
But the interpreter needs to recognize that `from` is a string key to a `TypedDict`, not the keyword `from`.

Or if you don't want to have to recognize `from` as a string instead of a keyword, we need a specification that allows us to put keywords as keys in `TypedDict`.

I was thinking maybe something like:
```
class C(TypedDict):
	"to": int
	"from": int
```
as an optional way to write the same thing.
History
Date User Action Args
2021-08-14 18:28:18Doug Hoskissonsetrecipients: + Doug Hoskisson
2021-08-14 18:28:18Doug Hoskissonsetmessageid: <1628965698.89.0.982806951929.issue44915@roundup.psfhosted.org>
2021-08-14 18:28:18Doug Hoskissonlinkissue44915 messages
2021-08-14 18:28:18Doug Hoskissoncreate