[Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c

Guido van Rossum guido at python.org
Sat Jun 28 01:06:01 CEST 2008


On Fri, Jun 27, 2008 at 3:59 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>
>
> Mark Dickinson wrote:
>
>>>
>>>>>> math.tohex(3.14)
>>>
>>> '0x1.91eb851eb851fp+1'
>>>>>>
>>>>>> math.fromhex('0x1.91eb851eb851fp+1')
>>>
>>> 3.1400000000000001
>
> How about just one self-inverse method .hex?
> .hex(float/hexstring) returns corresponding hexstring/float

That seems to be a misplaced attempt at economy, obscuring the intent
from the reader.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list