[docs] [issue19824] string.Template: Add PHP-style variable expansion example

Serhiy Storchaka report at bugs.python.org
Sun Mar 26 15:17:24 EDT 2017


Serhiy Storchaka added the comment:

Formatting with locals() and globals() should be used with careful. This is not the most idiomatic way of formatting. I think that the post in specialised blog would be better place for describing it than Python stdlib documentation.

Peoples coming from PHP world can use f-strings.

----------
nosy: +serhiy.storchaka
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19824>
_______________________________________


More information about the docs mailing list