-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More detailed info from help() #73
Comments
Extraction of information (meta-data) about a program is called Introspection or Reflection. Since Micropython is designed for embedded devices with limited resources, it does not make sense to always keep full metadata about the program (such as parameter names, types etc.). That would consume precious memory (either RAM or Flash). Some introspection is supported though. You can, for example, get a list of attributes of an object, or a list of functions in a module, because this is something Micropython has to maintain anyway, being a dynamic language. (see But you are right - we discussed this in another context: lvgl GUI builder. lvgl/lv_gui_builder#1 (comment) A Micropython GUI builder would need introspection so it could automatically display what are all the setters and getters of a widget, and call them with the right parameters (for example). |
Thank you very much! |
Hi,
I remember that we have talked about improving help() to tell more info about functions but I don't remember if it was implemented or not. E.g. tell the type of the parameters and return value for
help(lv.btn)
.If implemented can you tell how it can be used?
The text was updated successfully, but these errors were encountered: