zfoobar commented on issue #34987:
URL: https://github.com/apache/arrow/issues/34987#issuecomment-1501930878

   Just coming at this from the lens of a newb user - not even considering the 
Null case:
   
   ```
   >>> a = pa.scalar(1)
   >>> b = pa.scalar(2)
   >>> assert(pc.equal(a,b))
   >>> 
   
   ```
   
   ^^ It wouldn't immediately occur to me to even know what as_py() is or to 
use it to ensure the expected behavior in this case. A solid RTFM could be in 
order but to my eye it wasn't immediately clear that this should be done. 
   
   Agree that __eq__ returning boolean object, which can then be relied on to 
provide __bool__ seems intuitive.
   
   To @jorisvandenbossche's point, I did feel odd only adding __bool__ 
implementation for a single data type. =/ 
   
   Happy to take another swing at this if we can align on an implementation, 
otherwise as_py() it is... 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to