Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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