You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
We use the __getattr__() special method in a couple of places in GLAMkit to do something resembling method overriding, except calling some default method implementation if no other class overrides the method in the correct way (i.e. by defining the method on a subclass).
See examples in ListableMixin and EventBase.
This whole approach makes me nervous since it is hacking around Python's standard MRO class-inheritance method overriding behaviour for reasons that are not clear to me.
Sooner or later we are likely to be bitten hard by this unusual behaviour, beyond just the work-arounds I have already need for f0a5499 for example. Can we scrap these __getattr__() methods altogether?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We use the
__getattr__()
special method in a couple of places in GLAMkit to do something resembling method overriding, except calling some default method implementation if no other class overrides the method in the correct way (i.e. by defining the method on a subclass).See examples in
ListableMixin
andEventBase
.This whole approach makes me nervous since it is hacking around Python's standard MRO class-inheritance method overriding behaviour for reasons that are not clear to me.
Sooner or later we are likely to be bitten hard by this unusual behaviour, beyond just the work-arounds I have already need for f0a5499 for example. Can we scrap these
__getattr__()
methods altogether?The text was updated successfully, but these errors were encountered: