Skip to content

AttributeError not passed through when calling getattr #1353

Open
@slozier

Description

@slozier

The AttributeError should be passed through when calling getattr. For example:

class test:
    def __getattr__(self, attr):
        raise AttributeError("test")

t = test()
getattr(t, 'x')

throws

AttributeError: 'test' object has no attribute 'x'

instead of

AttributeError: test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions