Open auscompgeek opened 3 years ago
Yeah, this is really interesting. On Linux:
from wpimath._controls._controls.trajectory import TrapezoidProfile
print(repr(TrapezoidProfile.State()))
Gives me:
LLVM ERROR: out of memory
Aborted (core dumped)
When I don't capture the clsName this goes away and the repr works fine, but it doesn't work correctly. Presumably because the repr isn't registered until after the default arguments are processed?
Oh, hmm. It does seem like the repr was quite broken. Could've sworn it worked last year. On macOS:
>>> from wpimath.trajectory import TrapezoidProfile
>>> TrapezoidProfile.State()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 0: invalid start byte
Presumably because the repr isn't registered until after the default arguments are processed?
I think this is what's happening, yeah. Need a way to add some code before all the methods are registered.
despite having a
__repr__
implementation in thetemplate_inline_code
.