jorisvandenbossche commented on a change in pull request #11873:
URL: https://github.com/apache/arrow/pull/11873#discussion_r764722495



##########
File path: python/pyarrow/array.pxi
##########
@@ -1028,8 +1031,10 @@ cdef class Array(_PandasConvertible):
             PrettyPrintOptions options
 
         with nogil:
-            options = PrettyPrintOptions(indent, window)
+            options = PrettyPrintOptions(top_level_indent, window)
             options.skip_new_lines = skip_new_lines
+            if indent is not 0:
+                options.indent_size = indent

Review comment:
       Actually, since this is a new keyword: we probably want to follow the 
C++ default (which is also what is used now), and so use a default of 2 here in 
Python as well for the `indent` keyword

##########
File path: python/pyarrow/array.pxi
##########
@@ -1028,8 +1031,10 @@ cdef class Array(_PandasConvertible):
             PrettyPrintOptions options
 
         with nogil:
-            options = PrettyPrintOptions(indent, window)
+            options = PrettyPrintOptions(top_level_indent, window)
             options.skip_new_lines = skip_new_lines
+            if indent is not 0:
+                options.indent_size = indent

Review comment:
       We might want to set this always? (instead of only when it is not 0?) 
The default in C++ is 2 and not 0, so we will need to override that for 0 as 
well.




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