-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
ports/unix/mpconfigport.h: Enable "help" module by default. #3436
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
Conversation
The "help" module is disabled by default for the UNIX port, making it
difficult to explore the available modules (e.g. via the use of the
"help('modules')" call). This change enables it by default.
pfalcon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a FAQ. There's no need for C "help" implementation in unix port, because it can be implemented in Python. And the fact that nobody did it proves that it's not much needed at all. What unix port needs is #2908. Then when it's done, more useful things can be added (yet need to be implemented).
|
Even if it is undesirable to have this enabled by default, doesn't it at
least make sense to include the related configuration options in the
"mpconfigport.h" file so that others have a chance to figure out how to
enable this without having to investigate how it works for other ports?
Frankly, I didn't even know this feature existed until someone recently
mentioned it in the forums. I was disappointed to discover that it didn't
work for the UNIX port, where I do much of my development. You mentioned
this could be implemented in Python instead. Unfortunately, I don't know
how to do that. In any case, it doesn't make much sense to me why there
should be multiple implementations for the same thing written in different
languages. Why don't all the ports use a Python implementation if that is
preferred?
…On Nov 14, 2017 12:06 AM, "Paul Sokolovsky" ***@***.***> wrote:
***@***.**** requested changes on this pull request.
This is a FAQ. There's no need for C "help" implementation in unix port,
because it can be implemented in Python. And the fact that nobody did it
proves that it's not much needed at all. What unix port needs is #2908
<#2908>. Then when it's
done, more useful things can be added (yet need to be implemented).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3436 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB8poaYszwqEkmLLBZD2_smqNNRr03Tvks5s2S3LgaJpZM4QcfTl>
.
|
|
Whether the "help" feature is resonable at all, may be discussed. But if yes, it is better in my opion to use the built-in variant, simply because it is always in sync with the actual configuration. An external module would have to be re-tailored constantly. |
|
On baremetal |
|
Memory size of my devices doesn't increase - the boards I have in my drawer for 3 years has the same amount of memory as before, ditto for various routers, etc. ;-). In general, the outlook of this problem is described in https://github.com/micropython/micropython/wiki/ContributorGuidelines : there're two alternatives: CPython, which has builtin help on Unix, with which we don't want to compete, and other small languages, with which we want to stay competitive. Otherwise, uPy is very configurable and everyone should be able to adjust it for their needs, the default config however emphasize uPy's strong sides, which are: small size, and competitiveness with other small-size languages. |
Help can be implemented as: That can be imported from site.py or boot.py (we didn't decide which unix port should use, thus not implemented). If some things aren't doable, they can be implemented (optional; default off; with tests to not decrease coverage). |
Because all ports have different requirements and usecases. |
Thanks for mentioning this. I had not encountered the
How would one go about enumerating the available modules from Python that are not on the file system? This would include the stuff that comes standard with MicroPython and additional frozen code. I spent 20 minutes trying to figure this out, and was unsuccessful. I also looked at how the C implementation works, but I don't see where any of the C plumbing that it is being used is exposed to Python. |
See related #1354, #2906, #3436. Signed-off-by: Damien George <[email protected]>
|
This was enabled in 6430cd3 (on standard and dev variants of the unix port). |
The "help" module is disabled by default for the UNIX port, making it
difficult to explore the available modules (e.g. via the use of the
"help('modules')" call). This change enables it by default.