-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
Reproducer:
>>> from mpmath import mpf
>>> format(mpf(3.14), '')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sk/src/mpmath/mpmath/ctx_mp_python.py", line 359, in __format__
return format_mpf(s._mpf_, format_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sk/src/mpmath/mpmath/libmp/libmpf.py", line 1601, in format_mpf
format_dict = read_format_spec(format_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sk/src/mpmath/mpmath/libmp/libmpf.py", line 1465, in read_format_spec
raise ValueError("Invalid format specifier '{}'".format(format_spec))
ValueError: Invalid format specifier ''Instead, this should use default settings, like:
>>> format(3.14, '')
'3.14'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior