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


##########
python/pyarrow/array.pxi:
##########
@@ -1174,7 +1174,12 @@ cdef class Array(_PandasConvertible):
                              "({0}) did not match the passed number "
                              "({1}).".format(type.num_fields, len(children)))
 
-        if type.num_buffers != len(buffers):
+        if type.has_variadic_buffers:
+            if type.num_buffers > len(buffers):
+                raise ValueError("Type's expected number of buffers is at 
least "
+                                 "({0}) but the passed number is "
+                                 "({1}).".format(type.num_buffers, 
len(buffers)))

Review Comment:
   ```suggestion
                                    "{0}, but the passed number is "
                                    "{1}.".format(type.num_buffers, 
len(buffers)))
   ```
   
   For the way the sentence is phrased here, I think it shouldn't be with 
brackets like the one below.



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