You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are specific advise for library, such as avoiding to define all kind of constant (like you would do in an Arduino library) but only create those the user will need, not those for internal usage. (I am not expert in how Python treat constant... it seems that except for uppercase name, there is no such thing as a constant).
The text was updated successfully, but these errors were encountered:
So maybe special advice that are for people writing library would be separated.
A library is typically always a *.mpy file... so that advice is not needed anymore.
The library better be split in module, so that if you support multiple hardware, so that user will only import the piece they need.
Not a Python expert, but let's say a module is a folder with a init.py and various other *.py files where a library would be a single library.py file.
https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 is split into piece to permit that kind of import.
There are specific advise for library, such as avoiding to define all kind of constant (like you would do in an Arduino library) but only create those the user will need, not those for internal usage. (I am not expert in how Python treat constant... it seems that except for uppercase name, there is no such thing as a constant).
The text was updated successfully, but these errors were encountered: