Skip to content

Add AttributeError to __getattr__ in /core/callback.py ElementsCallbackData #9

@sindrelothe

Description

@sindrelothe

getattr should raise a AttributeError when value is not found, not KeyError, which is raised when getitem fails. New function should look like

class ElementsCallbackData(dict):
slots = ()

def __getattr__(self, value):
    try:
        return self.__getitem__(value)
    except:
        raise AttributeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions