• Laurens Valk's avatar
    py/runtime: Allow types to use both .attr and .locals_dict. · e2ca8ab8
    Laurens Valk authored
    Make it possible to proceed to a regular lookup in locals_dict if the
    custom type->attr fails.  This allows type->attr to extend rather than
    completely replace the lookup in locals_dict.
    
    This is useful for custom builtin classes that have mostly regular methods
    but just a few special attributes/properties.  This way, type->attr needs
    to deal with the special cases only and the default lookup will be used for
    generic methods.
    Signed-off-by: default avatarLaurens Valk <laurens@pybricks.com>
    e2ca8ab8
runtime.c 61 KB