You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-113804: Support "x" and "X" format types for floats
_Py_dg_dtoa_hex() is based on float.hex() with additional support for
the precision setting and some format flags.
Examples:
```pycon
>>> f'{-0.1:x}'
'-0x1.999999999999ap-4'
>>> (-0.1).hex()
'-0x1.999999999999ap-4'
>>> f'{3.14159:+X}'
'+0X1.921F9F01B866EP+1'
>>> f'{3.14159:.3x}'
'0x1.922p+1'
```
0 commit comments