The decoder's .reset() method seems to partially implement constructor's
assignments, but is not referenced anywhere. There is neither a direct
call site in the remainder of pd.py which uses the "reset" name, and
runtime computation only references "handle_*()" methods for commands
and responses.
Drop the unused .reset() method in the individual decoder before the
introduction of a common .reset() method approach for all decoders.
def putr(self, desc):
self.putt([self.last_cmd, ['Reply: %s' % desc]])
- def reset(self):
- self.cmd, self.arg = None, None
- self.token, self.state = [], 'GET COMMAND TOKEN'
-
def cmd_name(self, cmd):
c = acmd_names if self.is_acmd else cmd_names
return c.get(cmd, 'Unknown')