Skip to content

[BUG]: KeysView/ItemsView does not support set operations #5876

Open

Description

@InvincibleRMC

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

master

Problem description

When calling .items()/.keys() on the result of bind_map<>() return a custom KeysView/ItemsView which don't implement set operations. Ref. Looking at the history there seems to be a lot of issues/pull requests around them. I assume there is some history about why they don't use collections.abc.KeysView/collections.abc.ItemsView type at runtime and have a custom implementation.

Reproducible example code

No set operations exist. See #5877 for an example of 1.

Is this a regression? Put the last known working version here if it is.

Not a regression

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

    triageNew bug, unverified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions