PyDocs

Nav

Development Tools

AnyStr

typing

dataDeprecated 3.13
Deprecated since 3.13, removed in 3.18. Deprecated in favor of the new type parameter syntax. Use class A[T: (str, bytes)]: ... instead of importing AnyStr. See PEP 695 for more details. In Python 3.16, AnyStr will be removed from typing.__all__, and deprecation warnings will be emitted at runtime when it is accessed or imported from typing. AnyStr will be removed from typing in Python 3.18.
A constrained type variable.
0 Examples
No examples for typing/AnyStr.
See Also
No see-alsos for typing/AnyStr
0 Notes
No notes for AnyStr