Stefan Behnel added the comment:

You can easily see it by running timeit on fstrings, e.g. patched:

$ ./python -m timeit 'f"{34276394612:15}"'
1000000 loops, best of 3: 0.352 usec per loop
$ ./python -m timeit 'f"{34.276394612:8.6f}"'
1000000 loops, best of 3: 0.497 usec per loop

and original Py3.6 master:

$ ./python -m timeit 'f"{34276394612:15}"'
1000000 loops, best of 3: 0.435 usec per loop
$ ./python -m timeit 'f"{34.276394612:8.6f}"'
1000000 loops, best of 3: 0.589 usec per loop

It doesn't make much of a difference if you use constants or variables, BTW.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27818>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to