Skip to content

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Jul 12, 2025

I don't think those functions are part of the public API, but as they are publicly named, I'll still add the NEWS entry just in case.

@serhiy-storchaka I actually wondered between raising a TypeError and a ValueError but I went with a TypeError as it's what we raise when something doesn't match a signature (in some sense, we can assume that we have infinitely many overloads of the form replace(text, p1, p2, ..., pN, p{N+1})).

@picnixz
Copy link
Member Author

picnixz commented Jul 12, 2025

Since this isn't part of the public API, I can also replace the exception with an assertion. WDYT?

@picnixz picnixz closed this Jul 12, 2025
@picnixz picnixz deleted the fix/pydoc/replace-index-error-136572 branch July 12, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant