python-editor-v3
python-editor-v3 copied to clipboard
[DRAFT / WIP - DO NOT MERGE] Show filtered builtins documentation
Also allows links to the builtins from autocomplete and signature help where documentation is available.
Using type stubs from https://github.com/microbit-foundation/micropython-microbit-stubs/pull/101
To discuss:
- Maybe we should filter out API docs for builtin classes where we don't show any methods as they are filtered out as
__new__
- Add some kind of indicator that not all classes, class methods and functions are documented in the builtins section
Notes from Matt:
- I've exempted
__new__
but not convinced about exposing__new__
vs__init__
complexity to our users. But hard to mask it too... for str and list at least they do need to understand it as an object with methods. - Very weird to see range() three times because of overloads that exist for invisible type-related reasons. Same applies to constructors.
- The base class names are likely too scary for our users
- Lots of useful functions that are worth adding if everyone's happy with the idea (e.g. min, max)
Preview build will be at https://review-python-editor-v3.microbit.org/builtins-filters/
Unfortunate case where we are filtering out __new__
(with other special methods), but they are the only methods documented in the class: