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
The SerialBase should have the open() and close() Method implemented with a raise NotImplementedError() like this:
classSerialBase(io.RawIOBase):
# All the existing code ...defopen(self):
"""Opens the Port"""raiseNotImplementedError("This function must be implemented in the subclass")
defclose(self):
"""Closes the Port"""raiseNotImplementedError("This function must be implemented in the subclass")
This way it is immediatly clear that this functions must be implemented in subclasses and if somenone is looking at the code of SerialBase its obvious where these methods are doing.
The text was updated successfully, but these errors were encountered:
The
SerialBase
should have theopen()
andclose()
Method implemented with araise NotImplementedError()
like this:This way it is immediatly clear that this functions must be implemented in subclasses and if somenone is looking at the code of
SerialBase
its obvious where these methods are doing.The text was updated successfully, but these errors were encountered: