New submission from Adam Kellas: If you use safe_substitute and try to use a variable reference style other than ${foo}, you will find that it assumes ${foo} style. In particular, when evaluating $[foo] (square braces) and 'foo' is not defined, safe_substitute will put the string back together using ${foo} (curly braces).
See <http://stackoverflow.com/questions/14573230/pythons-string-template-changes-brackets-when-variable-is-unset> for details and test case. ---------- components: Library (Lib) messages: 180949 nosy: Adam.Kellas priority: normal severity: normal status: open title: string.Template.safe_substitute hard-wires "braces" as {} type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17078> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com