how can I add methods to a frozen/pre-compiled module
In micropython, lots of very useful stuff you'd find (such as in regular Cython) isn't available because of code space. As just one example, on my stock linux machine there are 67 entries in math.__dict__ but on my ESP32 there are only about 45. Sadly, a couple of the missing ones are things I would like to use, such as greatest common denominator: math.gcd() or least common multiple: math.lcm() and neither of these are built. In regular python I'd just do something like this: def my_lovely_lcm(a, b): return a * b // gcd(a, b) and then math.lcm = my_lovely_lcm BUT... apparently one of the micr
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.