PEP 705 was recently accepted for Python 3.13. It introduces a new typing qualifier ReadOnly[] which trycast will need to be able to recognize.
Until this support is added, I expect trycast() and isassignable() will always return False (or crash) when given a TypedDict type that includes ReadOnly items.
PEP 705 was recently accepted for Python 3.13. It introduces a new typing qualifier
ReadOnly[]which trycast will need to be able to recognize.Until this support is added, I expect
trycast()andisassignable()will always return False (or crash) when given a TypedDict type that includes ReadOnly items.