1.1 --- a/templates/native/introspection.c Fri Dec 09 23:30:41 2016 +0100
1.2 +++ b/templates/native/introspection.c Fri Dec 09 23:51:47 2016 +0100
1.3 @@ -31,9 +31,13 @@
1.4 __attr * const obj = &__args[1];
1.5 __attr * const name = &__args[2];
1.6 __attr * const _default = &__args[3];
1.7 + /* name.__data__ interpreted as string */
1.8 + __attr key = __load_via_object(name->value, __pos___key__);
1.9
1.10 - /* NOTE: To be written. */
1.11 - return __builtins___none_None;
1.12 + if ((key.code == 0) && (key.pos == 0))
1.13 + return *_default;
1.14 + else
1.15 + return __check_and_load_via_any(obj->value, key.pos, key.code);
1.16 }
1.17
1.18 static int __issubclass(__ref obj, __attr cls)