AlenkaF commented on issue #46187: URL: https://github.com/apache/arrow/issues/46187#issuecomment-2823301304
This behavior is not specific to PyArrow — it’s due to how Python handles the `and` and `or` operators. These are control flow operators, not overloadable like `&` and `|`. You might find these references helpful: - [StackOverflow comment ](https://stackoverflow.com/a/28720283) - [Python docs on boolean operations](https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not) - [Python's truth value testing](https://docs.python.org/3/library/stdtypes.html#truth-value-testing) (PyArrow Arrays are truthy by default, as they don’t override `__bool__`) If you're interested, contributions are always welcome — for example, updating the truthiness behavior to raise an error (like `NumPy`), or implementing more intuitive support for elementwise and (`&`) / or (`|`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org