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

Try harder by looking for a __bool__ magic method when extracing bool values from Python objects. #3638

Merged
merged 4 commits into from
Dec 19, 2023

Commits on Dec 19, 2023

  1. Try harder by looking for a __bool__ magic method when extracing bool…

    … values from Python objects.
    
    I decided to not implement the full protocol for truth value testing [1] as it
    seems confusing in the context of function arguments if basically any instance
    of custom class or non-empty collection turns into `true`.
    
    [1] https://docs.python.org/3/library/stdtypes.html#truth
    adamreichold committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8133aaa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e10d64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    57002d2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4177dfc View commit details
    Browse the repository at this point in the history