jorisvandenbossche commented on code in PR #13921:
URL: https://github.com/apache/arrow/pull/13921#discussion_r952248869


##########
python/pyarrow/io.pxi:
##########
@@ -1053,6 +1061,14 @@ cdef class Buffer(_Weakrefable):
     def __len__(self):
         return self.size
 
+    def __repr__(self):
+        name = f"{self.__class__.__module__}.{self.__class__.__name__}"
+        return (f"{name}("
+                f"address={hex(self.address)}, "
+                f"size={self.size}, "
+                f"is_cpu={self.is_cpu}, "
+                f"is_mutable={self.is_mutable})")

Review Comment:
   +1 on keeping the `< .. >` (instead of `()`) to not confuse it with an 
eval-able repr



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