Udi Meiri created BEAM-10690:
--------------------------------

             Summary: Python type hints: suport constrained TypeVars
                 Key: BEAM-10690
                 URL: https://issues.apache.org/jira/browse/BEAM-10690
             Project: Beam
          Issue Type: Bug
          Components: sdk-py-core
            Reporter: Udi Meiri


Support the following syntax when converting to internal Beam types,
and raise a TypeCheckError when trying to bind anything that isn't Any, one of 
the listed types, or a subtype of the listed types.

{code}
AnyStr = TypeVar('AnyStr', Text, bytes)
{code}

See: https://www.python.org/dev/peps/pep-0484/#generics (lots of cases to check)




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to