You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/20 14:45:19 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #7223: ARROW-8711: [Python] Expose timestamp_parsers in csv.ConvertOptions

pitrou commented on a change in pull request #7223:
URL: https://github.com/apache/arrow/pull/7223#discussion_r428071211



##########
File path: python/pyarrow/_csv.pyx
##########
@@ -296,10 +297,31 @@ cdef class ParseOptions:
         out.options = options
         return out
 
-    def __reduce__(self):
-        return ParseOptions, (self.delimiter, self.quote_char,
-                              self.double_quote, self.escape_char,
-                              self.newlines_in_values, self.ignore_empty_lines)
+    def __getstate__(self):
+        return (self.delimiter, self.quote_char, self.double_quote,
+                self.escape_char, self.newlines_in_values,
+                self.ignore_empty_lines)
+
+    def __setstate__(self, state):
+        (self.delimiter, self.quote_char, self.double_quote,
+         self.escape_char, self.newlines_in_values,
+         self.ignore_empty_lines) = state
+
+
+cdef class _ISO8601:
+    """
+    A special object indicating ISO-8601 parsing.

Review comment:
       It's easy to misspell "ISO-8601" (for example forget the hyphen, or use lowercase) and then get an entirely different behaviour :-) That's why I went for the dedicated object (if you misspell it, you get an exception).




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

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