Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PEP 484: Clarify definition of AnyStr
The definition of AnyStr as given makes sense only in Python 3, as observed by @srittau. To prevent confusion, this PR changes the definition to use Text instead of str. I also changed the two places where AnyStr was defined as an example, and made a few other related adjustments: - Remove mention of None as modifying the type, which is not true as of python#689. - Move Text up in the list of convenience definition because we now need it for the definition of AnyStr. - Modify definition of Optional to use `None` instead of `type(None)`, because the latter is not a valid static type.
- Loading branch information