From: David Mertz <me...@gnosis.cx>
Sent: 29 December 2019 15:58
To: Steve Barnes <gadgetst...@live.co.uk>
Cc: Steven D'Aprano <st...@pearwood.info>; python-ideas 
<python-ideas@python.org>
Subject: Re: [Python-ideas] Re: Testing for NANs [was Re: Fix 
statistics.median()?]

On Sun, Dec 29, 2019, 10:51 AM Steve Barnes 
<gadgetst...@live.co.uk<mailto:gadgetst...@live.co.uk>> wrote:
I  do have to disagree here as it is entirely possible, in the world of 
hardware interfacing, that an external hardware device could possibly supply an 
sNaN  as a something was seriously wrong flag, (as opposed to a I haven't got 
any data at the moment).

Wouldn't the right time to handle an sNaN coming from hardware *always* be upon 
acquisition rather than sticking it in a collection to operate on later? 
Fail-fast fail-hard seems like basic good design, that much more so when it 
comes to hardware.
[Steve Barnes]
Ideally yes David the best time is on acquisition but the hardware interfacing 
is most often done in a background task with no UI, e.g. a thread so it is not 
always practical to do so. Also these things are usually time critical so kept 
as simple as possible. Get the packet, ensure it is all there and pass it on 
for later processing so I can quite see sNaNs making it through to a statistics 
function.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/44FQLKPYM4CMAXD7E6NY6VWH6MBA5BF6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to