- Use list generators when possible rather than creating lists (for example use
range()to create a sequential list of values on the fly without assigning it to a variable).
- “pystack exhausted” errors - you may be doing something with a lot of of levels of function calls or recursion. Maybe try another way of solving your problem. Other times the cause is unclear, ask for guidance on the
help-with-CircuitPythonchannel on discord: https://adafru.it/discord
- FAQ: See “Memory” in the CircuitPython Frequently Asked Questions
- FAQ: Deeper dive via microPython and very relevant to CircuitPython