AlenkaF commented on code in PR #34380:
URL: https://github.com/apache/arrow/pull/34380#discussion_r1138598407


##########
python/pyarrow/types.pxi:
##########
@@ -1009,6 +1471,18 @@ cdef class PyExtensionType(ExtensionType):
     ----------
     storage_type : DataType
         The storage type for which the extension is built.
+
+    Examples
+    --------
+    Define a UuidType extension type subclassing PyExtensionType:
+
+    >>> import pyarrow as pa
+    >>> class UuidType(pa.PyExtensionType):
+    ...     def __init__(self):
+    ...         pa.PyExtensionType.__init__(self, pa.binary(16))
+    ...     def __reduce__(self):
+    ...         return UuidType, ()
+    ...

Review Comment:
   Ah, seems doctest and pickle do not get along well :D
   (related: 
https://stackoverflow.com/questions/73394835/how-to-test-pickle-ability-in-a-doctest)
   
   Will add a skip here and what is missing to have the example complete.



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