edponce commented on a change in pull request #12055:
URL: https://github.com/apache/arrow/pull/12055#discussion_r826245397



##########
File path: python/pyarrow/table.pxi
##########
@@ -209,19 +209,14 @@ cdef class ChunkedArray(_PandasConvertible):
         -------
         value : Scalar (index) or ChunkedArray (slice)
         """
-        if isinstance(key, slice):
+
+        if PySlice_Check(key):

Review comment:
       I did not measure nor know which one would be faster. This change is for 
consistency purposes. Some similar checks [use 
`PySlice_Check(key)`](https://github.com/apache/arrow/blob/master/python/pyarrow/array.pxi#L1153)
 and [others use `isinstance(key, 
slice)`](https://github.com/apache/arrow/blob/master/python/pyarrow/table.pxi#L212).
 Any preference?




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