Skip to content

annotationlib: namespace can be non-dict #132426

Description

@eliegoudout

Hello!

I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115.

if isinstance(obj, dict):

Image

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions