*Greetings Fellow Earthlings,*
*In python 3.11, python has a number of built-in functions which act as an
Interface for magic dunder methods. Two examples of what I am talking about
are shown below: *
*Begin Example 1 of 2*
*rocky = object()x = getattr(rocky, "length") x = rocky.__getattr__("
Hi Samuel,
Classes already have a `obj.mro()` public method that wraps their private
dunder `__mro__`.
Non-classes (instances) don't have a `__mro__`.
> Additionally, the class named `object` should have a method named
> `__mro__` and any class which inherits from `object` may override
> `__mro
On 24/03/2023 17:30, Samuel Muldoon wrote:
*Additionally, the class named `object` should have a method named
`__mro__` and any class which inherits from `object` may override
`__mro__` or inherit the default `* *object* *.__mro__` . *
It already has an attribute of that name:
>>> object._