New submission from anatoly techtonik: http://docs.python.org/2/library/string.html#template-strings
This class could be more useful with the following example: >>> from string import Template >>> t = Template('$who likes $what') >>> who = 'tim' >>> what = 'kung pao' >>> t.substitute(locals()) 'tim likes kung pao' This will help PHP folks to transition their .php files. ---------- assignee: docs@python components: Documentation messages: 204677 nosy: docs@python, techtonik priority: normal severity: normal status: open title: string.Template: Add PHP-style variable expansion example _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19824> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com