Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use maybe_lossy_cast() #68

Closed
krlmlr opened this issue Apr 6, 2019 · 5 comments · Fixed by #93
Closed

Use maybe_lossy_cast() #68

krlmlr opened this issue Apr 6, 2019 · 5 comments · Fixed by #93
Milestone

Comments

@krlmlr
Copy link
Member

krlmlr commented Apr 6, 2019

in vec_cast.hms.character() as soon as it becomes available.

@krlmlr krlmlr added this to the 0.5.0 milestone Apr 16, 2019
@krlmlr krlmlr modified the milestones: 0.5.0, 0.6.0 Dec 31, 2019
@krlmlr krlmlr modified the milestones: 0.6.0, 1.0.0 Jan 12, 2021
@krlmlr
Copy link
Member Author

krlmlr commented Jan 12, 2021

Now allow_lossy_cast(), available since vctrs 0.2.0 .

@krlmlr
Copy link
Member Author

krlmlr commented Jan 12, 2021

maybe_lossy_cast() also exists.

@lionel-: Are you planning substantial changes to maybe_lossy_cast()? Is it safe to use here?

@lionel-
Copy link
Member

lionel- commented Jan 12, 2021

I would say this is a more experimental area of vctrs. It doesn't seem to be very useful either. Do you really need this? I would avoid throwing lossy cast conditions and just throw coercion errors personally. That said if you really need it go ahead, there are no changes planned now (but vctrs is not under active dev at the moment).

krlmlr added a commit that referenced this issue Jan 12, 2021
- `vec_cast()` and `as_hms()` throw error instead of a warning if input can't be parsed (#68).
@krlmlr
Copy link
Member Author

krlmlr commented Jan 12, 2021

Thanks, throwing an error now.

@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants