[Fixed] Missing '-' when formatting negative numbers with f-strings

The following code:

print(f'{-0.003:6.3f}')
print(f'{0.003:6.3f}')
print(f'{-1.234:6.3f}')
print(f'{1.234:6.3f}')

Produces the following output:

0.003
 0.003
1.234
 1.234

Instead of the following one:

-0.003
 0.003
-1.234
 1.234
1 Like

Thanks @stefano.menci - Clearly a bug.
I’ll update this thread when that gets fixed.

2 Likes

That should now be fixed

1 Like