reflection: attributes() (dir-like) and help() with _doc_
- new list type (iterable, indexable) backing attributes() - attributes(obj): member names of a table/object, follows __index inheritance, includes native and slot members (like Python dir()) - help(obj): prints the value's _doc_ documentation, else its type and attributes - natives carry an optional _doc_ string (cat_types_native_new_doc); stdlib builtins documented - len() handles lists - examples/reflect.cat + 8 assertions wired into run_tests.sh (77 total)
This commit is contained in:
1 parent
4dae4ee1cd
commit
1203acd64b
8 files changed
+381
-14