Skip to content
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

"past the end" wording is not always appropriate #1543

Closed
krlmlr opened this issue Feb 22, 2022 · 3 comments · Fixed by #1550
Closed

"past the end" wording is not always appropriate #1543

krlmlr opened this issue Feb 22, 2022 · 3 comments · Fixed by #1550
Milestone

Comments

@krlmlr
Copy link
Member

krlmlr commented Feb 22, 2022

tidyselect::eval_select(rlang::expr(Z), rlang::set_names(letters))
#> Error in `chr_as_locations()`:
#> ! Can't subset columns past the end.
#> x Column `Z` doesn't exist.

Created on 2022-02-22 by the reprex package (v2.0.1)

Ideally, "past the end" would be used only for numeric indices?

Introduced in 6258f94.

@krlmlr
Copy link
Member Author

krlmlr commented Feb 22, 2022

More focused reprex:

vctrs::vec_as_location("Z", 1, "a")
#> Error:
#> ! Can't subset elements past the end.
#> x Element `Z` doesn't exist.

Created on 2022-02-22 by the reprex package (v2.0.1)

@lionel- lionel- added this to the next milestone Mar 1, 2022
@krlmlr
Copy link
Member Author

krlmlr commented Apr 2, 2022

@lionel-: It's a pity that this didn't make it into vctrs 0.4.0. Would you review a PR?

@lionel-
Copy link
Member

lionel- commented Apr 4, 2022

oops sorry I forgot about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants