[Python-ideas] Hexadecimal floating literals

Guido van Rossum guido at python.org
Thu Sep 21 23:16:27 EDT 2017


On Thu, Sep 21, 2017 at 7:57 PM, David Mertz <mertz at gnosis.cx> wrote:

> I think you are missing the point I was assuming at. Having a binary/hex
> float literal would tempt users to think "I know EXACTLY what number I'm
> spelling this way"... where most users definitely don't in edge cases.
>

That problem has never stopped us from using decimals. :-)


> Spelling it float.fromhex(s) makes it more obvious "this is an expert
> operation I may not understand the intricacies of."
>

I don't see why that would be more obvious than if it were built into the
language -- just because something is a function doesn't mean it's an
expert operation.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170921/6ed42fd7/attachment.html>


More information about the Python-ideas mailing list