parameters: (self, parity)
docstring: Change parity setting.
docstring_summary: Change parity setting.
docstring_tokens: Change parity setting .
function: def parity(self, parity):
          """Change parity setting."""
          if parity not in self.PARITIES:
              raise ValueError("Not a valid parity: {!r}".format(parity))
          self._parity = parity
          if self.is_open:
              self._reconfigure_port()
function_tokens: def parity ( self , parity ) : if parity not in self . PARITIES : raise ValueError ( "Not a valid parity: {!r}" . format ( parity ) ) self . _parity = parity if self . is_open : self . _reconfigure_port ( )