Skip to content

Improve error message when comparing two types.SimpleNamespace objects #136193

Description

@sobolevn

Feature or enhancement

Following #136109 (comment)

Old error message:

In [1]: from types import SimpleNamespace
In [2]: a = SimpleNamespace(a=1, b=2)
In [3]: b = SimpleNamespace(a=1, b=3)
In [4]: a < b
TypeError: '<' not supported between instances of 'dict' and 'dict'

New error message:

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

Labels

extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions