[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively

2016-09-28 Thread azrdev
azrdev added the comment: (Sorry for not replying so long, I expected an email notification) > Why not use string.Template? because it's so slow > I think that there may be a good argument to be made for a safe_format with > *named* arguments, like string.Template, but not p

[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively

2015-07-01 Thread azrdev
New submission from azrdev: {1} {0}.format('one').format('two') should return two one, but throws IndexError: tuple index out of range This would allow partial replacements, similar to string.Template.safe_substitute() I suggest an analog construction (e.g. a method string.safe_format