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

2023-04-27 Thread David Mertz, Ph.D.
It's actually much worse than making obviously buggy code pass silently. It can also make uncommon bugs almost impossible to detect. Some code looks like `mystring.format(**values)`. Whether values contains the needed keys can vary at runtime now. It might be fine under most code paths, but fail i

[Python-ideas] Re: Make ellipsis an indicator of missing implementation

2023-04-27 Thread Antoine Rozo
Raising an exception in that case would be a breaking change only for an aesthetic preference. Some codes use ellipsis as this in functions body and don't want it to raise an error. Also it's going to be confusing to understand why an exception is raised in that place. Le jeu. 27 avr. 2023 à 15:50

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

2023-04-27 Thread Matthias Görgens
What is the use case for this? Does it have any use case that's not already served by functools.partial? As far as I can tell, this proposal would turn buggy code that currently throws an obvious exception into code that silently does the wrong thing. This seems more appropriate for PHP or JavaS

[Python-ideas] Make ellipsis an indicator of missing implementation

2023-04-27 Thread haael
In examples in the web very often we see unfinished or partial code, where the ellipsis "..." is used in place of missing instructions. Idea: make ellipsis used in that context throw an exception, reminding the user that this code is work in progress. The exception could be called ToDoErro

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

2023-04-27 Thread Damian Cross
the concept doesn't seem to have a downside. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https: