On 2021-08-30 04:31, Steven D'Aprano wrote:
On Sun, Aug 29, 2021 at 08:20:07PM -0400, tritium-l...@sdamon.com wrote:
Not to go off on too much of a tangent, but isn't NaN unorderable? Its
greater than nothing, and less than nothing, so you can't even really sort a
list with a NaN value in it (
On Mon, Aug 30, 2021 at 1:33 PM Steven D'Aprano wrote:
> However we could add a function, totalorder, which can be used as a key
> function to force an order on NANs. The 2008 version of the IEEE-754
> standard recommends such a function:
>
> from some_module import totalorder
> sorted([4,
On Sun, Aug 29, 2021 at 08:20:07PM -0400, tritium-l...@sdamon.com wrote:
> Not to go off on too much of a tangent, but isn't NaN unorderable? Its
> greater than nothing, and less than nothing, so you can't even really sort a
> list with a NaN value in it (..though I'm sure python does sort it by
Not to go off on too much of a tangent, but isn't NaN unorderable? Its
greater than nothing, and less than nothing, so you can't even really sort a
list with a NaN value in it (..though I'm sure python does sort it by some
metric for practical reasons) - it would be impossible to find a NaN with a
On 26/08/2021 15:44, Christopher Barker wrote:
Python itself is purposely not designed to provide quick and easy
shell access.
Is that really true? What evidence do you have for that statement?
Best wishes
Rob Cliffe
___
Python-ideas mailing list
On 27Aug2021 15:50, Finn Mason wrote:
>Perhaps a math.hasnan() function for collections could be implemented with
>binary search?
>
>math.hasnan(seq)
Why would a binary search be of use? A staraight sequential scan of the
sequence seems the only reliable method. Binary search is for finding a
v