BUG or FEATURE ? : " parity:None "
In the doc of serial communication, I wrote:
parity:
Usually in: 'N': none 'O': odd, 'E': even (not really used: 'M': mark, 'S': space)
Default: None
But None
is not a valid parity for now, it must be "N". If someone use something like:
opt = {"parity": None}
, it will not work.
Do I have to change serial.py
for something like:
if self.parity:
_parity = RFC2217_PARITY_MAP[self.parity]
else:
_parity = RFC2217_PARITY_MAP["N"]
self.rfc2217_port_settings["parity"].set(struct.pack("!B", _parity))
Or do we consider None
as invalid ?