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
I tried to subclass the FixedPoint class and ran into several issues.
It seems that the context manager is used internally in several functions. For those functions, I can't use super() because the attributes added by the child class do not get saved.
fixedpoint.functions only support fixedpoint.FixedPoint objects.
property setters are used in the context manager exit, which apparently don't get inherited (given the examples below).
When I do this, I get the same exception as the code example above but for mismatch_alert. So I redo all the properties and setters (copied from fixedpoint.fixedpoint) and I get the following:
Description
I tried to subclass the FixedPoint class and ran into several issues.
It seems that the context manager is used internally in several functions. For those functions, I can't use super() because the attributes added by the child class do not get saved.
fixedpoint.functions only support fixedpoint.FixedPoint objects.
property setters are used in the context manager exit, which apparently don't get inherited (given the examples below).
Steps to reproduce
Expected Behavior
Update the documentation to provide specific steps for subclassing. An example would be nice.
As far as the code example, I'd expect this:
Environment
python -V
): 3.8.0pip list
): 1.0.1Logs
From the example code above:
The text was updated successfully, but these errors were encountered: