On Sat, 29 Apr 2023 at 23:36, MRAB wrote:
>
> On 2023-04-29 08:31, Matsuoka Takuo wrote:
> > On Sat, 29 Apr 2023 at 00:52, MRAB wrote:
> >>
> >> What happens if you do '{open}...{close}'.partial_format(open='{close}'?
> >> You get '{close}...{close}', and you're going to have a problem using
> >>
I can't think of a case where the check for "\n" would result in a false
negative. It likely makes sense to do that to keep python startup as
lightweight as possible.
I've made a PR that implements a proof-of-concept:
https://github.com/python/cpython/pull/103998
It's currently done via the Pytho
Moreover, I have worked on a lot of code where ellipsis is used to mean
"this branch isn't implemented yet, but doing nothing isn't terrible."
I don't love that code. I'd rather it use `pass` and a clarifying comment.
But this change would make all that existing code much more broken.
On Sat, A
I agree. Giving punctuation-based syntax like ... a meaning that isn't
obvious on reading the code makes for unreadable code. Whereas having
`raise Exception ('TODO')` accomplishes the same thing but also allows
English documentation. The ... here is open to interpretation, especially
as a new feat
On 2023-04-29 08:31, Matsuoka Takuo wrote:
On Sat, 29 Apr 2023 at 00:52, MRAB wrote:
What happens if you do '{open}...{close}'.partial_format(open='{close}'?
You get '{close}...{close}', and you're going to have a problem using
that as a format string and replacing only the second '{close}'.
On Sat, 29 Apr 2023 at 23:01, wrote:
>
> Ad 4) Wouldn't "<=" be a little more logical than "=>"? The perceived
> direction of the "flow" of the default value is exactly opposite, i.e., the
> default value is always evaluated and then put *into* the argument.
>
Using arrows to represent informat
Ad 4) Wouldn't "<=" be a little more logical than "=>"? The perceived direction
of the "flow" of the default value is exactly opposite, i.e., the default value
is always evaluated and then put *into* the argument.
For example:
def bisect_right(a, x, lo=0, hi<=len(a), *, key=None):
__
On Sat, 29 Apr 2023 at 00:52, MRAB wrote:
>
> What happens if you do '{open}...{close}'.partial_format(open='{close}'?
> You get '{close}...{close}', and you're going to have a problem using
> that as a format string and replacing only the second '{close}'.
>
> Or how about '{open}...{close}'.part