-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
BUG: raise a proper exception when str.rsplit is passed a regex and clarify the docs #62035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put this in _str_rsplit
for each implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure no problem but this exact error is raised here for the other methods so I was following the same process. See for example find
.
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Noticed this while working on pandas-dev/pandas-stubs#1278.
rsplit
doesn't accept regular expressions but was silently accepting them and producing bad results. I added a check on the type of the input and updated the documentation.