04.12.19 16:02, Anders Munch пише:
Victor Stinner [mailto:vstin...@python.org] wrote:
You may want to have a look at the deferred PEP 501 -- General purpose string
interpolation:
https://www.python.org/dev/peps/pep-0501/
I'm struggling to see what i-strings would do for i18n that str.format doesn't
do better.
You would not need to repeat yourself.
_('{name} costs ${price:.2f}').format(name=name, price=price)
vs
i'{name} costs ${price:.2f}'
In addition, you need to translate the format for money (in some
cultures you need not two digits after dot), and this is hard to do with
str.format().
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/46VZ2Q6QNT444YM7MV66YV26IYNIQEQC/
Code of Conduct: http://python.org/psf/codeofconduct/