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
We should consider whether our abstract classes, which are used to define API interfaces, should be made to be strict. By using the @AbstractMethod decorator from the abc module of the standard library, you can force derived classes to implement a defined interface.
For example, if we want loading.SyringePump.SyringePump to always have a withdraw and dispense:
We should consider whether our abstract classes, which are used to define API interfaces, should be made to be strict. By using the @AbstractMethod decorator from the abc module of the standard library, you can force derived classes to implement a defined interface.
For example, if we want loading.SyringePump.SyringePump to always have a withdraw and dispense:
See here for a discussion on abstract classes including why they're sometimes better than the
NotImplementedError
method we currently use.The text was updated successfully, but these errors were encountered: