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


##########
python/pyarrow/io.pxi:
##########
@@ -2080,6 +2098,12 @@ cdef class Codec(_Weakrefable):
 
         return pybuf if asbytes else out_buf
 
+    def __repr__(self):
+        name = f"{self.__class__.__module__}.{self.__class__.__name__}"
+        return (f"{name}("
+                f"name={self.name}, "
+                f"compression_level={self.compression_level})")

Review Comment:
   
https://github.com/apache/arrow/pull/13921/commits/eed7303948245599d498cbd3bfa2e157617346a5



##########
python/pyarrow/memory.pxi:
##########
@@ -76,6 +76,12 @@ cdef class MemoryPool(_Weakrefable):
         """
         return frombytes(self.pool.backend_name())
 
+    def __repr__(self):
+        name = f"{self.__class__.__module__}.{self.__class__.__name__}"
+        return (f"{name}("
+                f"backend_name={self.backend_name}, "
+                f"bytes_allocated={self.bytes_allocated()}, "
+                f"max_memory={self.max_memory()})")

Review Comment:
   
https://github.com/apache/arrow/pull/13921/commits/ae55f755a259b9079cb306fe224c98bcd93829b4



##########
python/pyarrow/table.pxi:
##########
@@ -2013,7 +2013,7 @@ cdef class RecordBatch(_PandasConvertible):
         >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],
         ...                                     names=["n_legs", "animals"])
         >>> batch.serialize()
-        <pyarrow.lib.Buffer object at ...>
+        pyarrow.lib.Buffer(address=..., size=..., is_cpu=True, is_mutable=True)

Review Comment:
   
https://github.com/apache/arrow/pull/13921/commits/febd2efa417feba35b57ca41481b18c0992fd9c8



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