You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Danny McCormick (Jira)" <ji...@apache.org> on 2022/06/04 17:14:00 UTC

[jira] [Commented] (BEAM-10690) Python type hints: support constrained TypeVars

    [ https://issues.apache.org/jira/browse/BEAM-10690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17548773#comment-17548773 ] 

Danny McCormick commented on BEAM-10690:
----------------------------------------

This issue has been migrated to https://github.com/apache/beam/issues/20388

> Python type hints: support 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
>            Priority: P3
>              Labels: types
>
> 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.20.7#820007)