Dear community;
I would like to create a abstract class inherit from abc (Abstract Base Class) but I found nothing about lib ABC into micropython, maybe it is simply impossible or I did not search well....
Thank you for your replies and help!!
Abstract class in MicroPython
Re: Abstract class in MicroPython
This forum will be made read-only soon. Please post at GitHub Discussions.
MicroPython doesn't support abstract classes but if you're porting exisiting code that uses ABC, then you can just write an empty ABC class and abstractmethod decorator.
See
https://github.com/micropython/micropyt ... tdlib/abc/
MicroPython doesn't support abstract classes but if you're porting exisiting code that uses ABC, then you can just write an empty ABC class and abstractmethod decorator.
See
https://github.com/micropython/micropyt ... tdlib/abc/
Re: Abstract class in MicroPython
Thank for your reply!!
Re: Abstract class in MicroPython
Class name:
Phylum
class MyClass:
i=123
def f(self):
print("correct")
Phylum
class MyClass:
i=123
def f(self):
print("correct")
Re: Abstract class in MicroPython
Is empty ABC class and the abstractmethod decorator accurate? I thought MicroPython doesn't recognize these constructs.jimmo wrote: ↑Sun Oct 09, 2022 11:16 pmThis forum will be made read-only soon. Please post at GitHub Discussions.
font generator
MicroPython doesn't support abstract classes but if you're porting exisiting code that uses ABC, then you can just write an empty ABC class and abstractmethod decorator.
See
https://github.com/micropython/micropyt ... tdlib/abc/