danepitkin commented on code in PR #36877:
URL: https://github.com/apache/arrow/pull/36877#discussion_r1275248700


##########
python/pyarrow/scalar.pxi:
##########
@@ -113,8 +113,12 @@ cdef class Scalar(_Weakrefable):
         else:
             with nogil:
                 check_status(self.wrapped.get().Validate())
-
+ 
     def __repr__(self):
+        if isinstance(self, TimestampScalar):

Review Comment:
   Instead of checking for TimestampScalar type in the base class, let's 
override `__repr__` in the `cdef class TimestampScalar`. 
   
   Here is the implementation of `Array.__repr__`, which is mentioned in the 
issue linked. 
https://github.com/apache/arrow/blob/main/python/pyarrow/array.pxi#L1222



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