[Python-ideas] Re: Allowing `str.format` to format one or more parameters instead of all parameters

2023-04-25 Thread Rob Cliffe via Python-ideas
On 21/04/2023 23:20, Samuel Muldoon wrote: # pfr is partially_formatted_result pfr =r"\mathjax{{color}}{{text}}".format(color = "blue") # ERROR! missing parameter `text` result =r"\mathjax{{color}}{{text}}".format(text = "Spanish") # ERROR! missing parameter `color` Is there any reason yo

[Python-ideas] Re: Allowing `str.format` to format one or more parameters instead of all parameters

2023-04-25 Thread Joao S. O. Bueno
On Sat, Apr 22, 2023 at 10:06 AM Damian Cross wrote: > That would have the effect that every use of str.format for everyone would > start producing partially-formatted strings if an argument is accidentally > omitted instead of raising an error. Some people might not like that. >

[Python-ideas] Re: Allowing `str.format` to format one or more parameters instead of all parameters

2023-04-25 Thread Chris Angelico
On Wed, 26 Apr 2023 at 11:18, Joao S. O. Bueno wrote: > Worst case scenario, one goes from one non-running program to a running > program producing partially incorrect output. > Wording that another way: Buggy code, instead of raising an immediate exception, now produces wrong output. This is a