I wish #Python's string replace method allowed specifying "count" as a keyword argument.

>>> text = "Hello? Python?"
>>> text.replace("?", "!", count=1)

I find that more explicit than this:

>>> text.replace("?", "!", 1)
'Hello! Python?'

But the replace only allows positional arguments 🐍😢

@treyhunner Make a GitHub issue and even a PR?
@adamchainz A Python ideas thread was suggested too, but it looks like @hugovk just opened an issue 😊: https://github.com/python/cpython/issues/106487
Allow `str.replace`'s `count` to be a keyword argument · Issue #106487 · python/cpython

Feature or enhancement (A clear and concise description of your proposal.) Pitch str.replace takes old and new strings as parameters, and an optional count parameter: https://docs.python.org/3/libr...

GitHub

@treyhunner

It's weird that it was not already.
I missed the ideas topic - but at this point I would not be surprised if there are some "static-typists" against the idea.