jorisvandenbossche commented on issue #34944:
URL: https://github.com/apache/arrow/issues/34944#issuecomment-1500087960

   Ah, it's failing in the last line that I showed in the snippet above 
(calling `PySequence_Size`), but we fail to check for a python error afterwards 
(I suppose because the code assumed that would always work because of the 
sequence check before that). 
   Checking for a python error and raising this one, correctly gives the 
"TypeError: object of type 'A' has no len()" error.
   
   Looking at the python C API docs, it indeed mentions that `PySequence_Check` 
always passes for objects with `__getitem__`: 
https://docs.python.org/3/c-api/sequence.html#c.PySequence_Check


-- 
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