From 889881e40cfd5886547c0e97c5f067c986a09508 Mon Sep 17 00:00:00 2001 From: Miles Granger Date: Tue, 23 Aug 2022 12:05:10 +0200 Subject: [PATCH] Add closed to NativeFile and Doctest --- python/pyarrow/io.pxi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/pyarrow/io.pxi b/python/pyarrow/io.pxi index a423e2e7fe700..96d8f4c241240 100644 --- a/python/pyarrow/io.pxi +++ b/python/pyarrow/io.pxi @@ -124,6 +124,7 @@ cdef class NativeFile(_Weakrefable): def __repr__(self): name = f"pyarrow.{self.__class__.__name__}" return (f"<{name} " + f"closed={self.closed} " f"own_file={self.own_file} " f"is_seekable={self.is_seekable} " f"is_writable={self.is_writable} " @@ -774,6 +775,13 @@ cdef class PythonFile(NativeFile): As a downside, there is a non-zero redirection cost in translating Arrow stream calls to Python method calls. Furthermore, Python's Global Interpreter Lock may limit parallelism in some situations. + + Examples + -------- + >>> import io + >>> import pyarrow as pa + >>> pa.PythonFile(io.BytesIO()) + """ cdef: object handle