Content-Length: 271626 | pFad | https://github.com/python/cpython/issues/96079

15 Lib/typing.py Missing field _name for _AnnotatedAlias · Issue #96079 · python/cpython · GitHub
Skip to content

Lib/typing.py Missing field _name for _AnnotatedAlias #96079

@iyume

Description

@iyume

Bug report

Relate to: https://github.com/python/cpython/blob/main/Lib/typing.py#L2102

_AnnotatedAlias should give name="Annotated" to _GenericAlias

The cpython main branch add the __getattr__ to define a different behaviour from _GenericAlias

I wonder if this is a bug.

To perform a runtime check, I can only use sys.version_info >= (3, 9) and isinstance(obj, _AnnotatedAlias)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/96079

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy