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


##########
python/pyarrow/io.pxi:
##########
@@ -121,6 +121,14 @@ cdef class NativeFile(_Weakrefable):
     def __exit__(self, exc_type, exc_value, tb):
         self.close()
 
+    def __repr__(self):
+        name = f"{self.__class__.__module__}.{self.__class__.__name__}"
+        return (f"{name}("
+                f"own_file={self.own_file}, "
+                f"is_seekable={self.is_seekable}, "
+                f"is_writable={self.is_writable}, "
+                f"is_readable={self.is_readable})")

Review Comment:
   Would it be useful to add whether it is `closed` or not?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to