On Mon, Mar 14, 2022, 7:52 PM Steven D'Aprano

> I got "No results matched your query" on the second URL, at which point I
> didn't bother with the first.
>

Hmm... while I don't support the proposal, I saw results at both links.
Those links were the first good faith comments I saw from OP.

A pretty large number of prominent projects use either:

foo = bar[:n] + newval + bar[n+1:]

Or:

newfoo = list(foo)
newfoo[n] = newval
foo = tuple(newfoo)

Somewhere in their codebases. I find that mild evidence in favor of the
idea. But the pattern seems to be "occasionally in large-ish projects."

On the other hand, looking through those examples in a cursory manner made
me think about 75% of the time "why are they doing this silly approach?"
and 25% "this is easy enough as is." None of them made me think "I wish I
had a method/function."
_______________________________________________
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://mail.python.org/archives/list/python-ideas@python.org/message/2FZ6N2W4FUK3IA4OICA2UZASQTZ6FPIO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to