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

please fix z.coerce.boolean() for "false" #3924

Open
jayarjo opened this issue Dec 23, 2024 · 1 comment
Open

please fix z.coerce.boolean() for "false" #3924

jayarjo opened this issue Dec 23, 2024 · 1 comment

Comments

@jayarjo
Copy link

jayarjo commented Dec 23, 2024

Note — Boolean coercion with z.coerce.boolean() may not work how you expect. Any truthy value is coerced to true, and any falsy value is coerced to false.

This is not intuitive and irrational. Please fix z.coerce.boolean() to produce false from "false".

Otherwise we can safely assume that coerce is simply broken (!) for booleans.

@maurer2
Copy link

maurer2 commented Dec 24, 2024

Hello, some work is being done on the issue here: #3906

Cheers

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

No branches or pull requests

2 participants