[Python-ideas] PEP 485: A Function for testing approximate equality

Chris Barker chris.barker at noaa.gov
Wed Jan 28 07:31:01 CET 2015


On Tue, Jan 27, 2015 at 4:38 PM, Zero Piraeus <schesis at gmail.com> wrote:

<snip>


> Note that my example was an any_close() function, not an all_close()
> one. I doubt anyone's seriously going to suggest adding *three* new
> functions, so anyone who wants something like that will by necessity
> end up rolling their own.
>

OK -- that is pretty compelling --- I have been looking for use-cases for
where having a symmetrical test would be a clear advantage, and this is one.

But this is where I'm unclear -- is this "any_close" function something you
think is a real use case -- i.e. you have needed such a thing, or think
there is a strong chance that you will. Or just something that _could_ be
done.

Granted, I think your point is that if it _could_ be done, there is a good
chance that _someone_ will do it -- and with that in mind we want as few
surprising behaviors in the standard lib as possible.

But it would be even more compelling if it were a real use case ;-)

Anyway, it seems that Steven is going to write up something to clarify the
issues, and I'll try to write the various options up in the PEP, and then
we can suss out which options are acceptable to most folks.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150127/0a8223ed/attachment-0001.html>


More information about the Python-ideas mailing list