Closed
Description
Port, board and/or hardware
openmv
MicroPython version
v1.23.0
Reproduction
See below.
Expected behaviour
There should be no error.
Observed behaviour
We have a class like this:
class Model(uml.Model):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Its parent is a custom C class that implements make_new
and accepts positional and keyword arguments.
When you pass just positional arguments to Model()
in code using this subclass things work as expected. When you pass kwargs
you get this error:
TypeError: function doesn't take keyword arguments
It appears MicroPython refuses to pass the kwargs
to the parent class. Note that the error is not coming from code being executed in our make_new
in C. It appears something else has rejected the kwargs
being passed.
Additional Information
No response
Code of Conduct
Yes, I agree