-
Notifications
You must be signed in to change notification settings - Fork 367
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
deprecate delete!, define deleteat! #2854
Conversation
Thanks. It's indeed a bit weird to have different requirements for |
For this |
I guess it will be accepted in Compat, but we'll have to do it ourselves if we want it to happen. |
OK - I will implement |
we should also add |
Also add |
@nalimilan - I have decided to split This PR should be good for a review. |
test/dataframe.jl
Outdated
# the exception type changed between Julia 1.0.2 and Julia 1.1 | ||
# so we use their supertype below | ||
@test_throws Exception keepat!(df, [10]) | ||
@test_throws Exception keepat!(df, [0]) |
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.
Make this conditional on VERSION
? That way we ensure the type doesn't change without us noticing.
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.
OK. I will add it. I was just lazy because tired of fixing such things since Julia Base is not considering changing of exception type as breaking.
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
This should be good for another review. |
Thank you! |
Fixes #2853
@nalimilan: the issue I was not sure about what would be best to do is if passed indices contain duplicates or are not sorted.
Intuitively I would prefer
deleteat!
to perform sorting and deduplication instead of throwing an error (the cost of this should not be super big in typical cases). Alternatively I could require inkeepat!
sorted and unique indices.