Skip to content

dict __dict__ attribute missing #140943

@dumoulina

Description

@dumoulina

Bug report

Bug description:

vars(dict())

raises the exception:

vars() argument must have __dict__ attribute

I would assume this fix to be quite affordable by returning itself. It could potentially create infinite loops but I think breaking vars() call is even worse as it should not assume any type.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions