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
In the process of extending MicroPython in C, there is a class named ParentClass, which has a member method calledcall , all of which are implemented in the C language.
I have written another MicroPython class that inheritsParentClass:
classChildClass(ParentClass):
defchild_call(self):
print("This is a subclass method")
At this point, how to call the child_call method of the subclass in ParentClass? I want to call this method in MicroPython through the following code:
c=ChildClass()
c.call()
At this point, the ParentClass needs to find thechild_call'of the subclass and call it in C.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the process of extending MicroPython in C, there is a class named
ParentClass
, which has a member method calledcall
, all of which are implemented in the C language.I have written another MicroPython class that inherits
ParentClass
:At this point, how to call the
child_call
method of the subclass inParentClass
? I want to call this method in MicroPython through the following code:At this point, the
ParentClass
needs to find thechild_call
'of the subclass and call it in C.How should it be implemented?
Beta Was this translation helpful? Give feedback.
All reactions