Skip to content

PySet_Contains is different from set.__contains__ #6

@JelleZijlstra

Description

@JelleZijlstra

The documentation says "Unlike the Python __contains__() method, this function does not automatically convert unhashable sets into temporary frozensets." This isn't something that has caused me problems personally, and fixing it may not be worth the compatibility hassle, but this sort of subtle behavior difference between C and Python is a bad pattern.

The same applies to PySet_Discard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions