vctrs
vctrs copied to clipboard
`obj_print*()` gain max argument
This argument is also accepted by base::print(), but undocumented.
Closes #1355.
also accepted by base::print(), but undocumented.
max is actually documented in ?print.default, if that is what you were referring to
I don't understand why we don't slice in the generic?
@lionel-: IIRC, to slice in the generic, we would have to pass both the sliced vector and the original lengths to the detail methods. Do you prefer this solution?
Don't we pass the whole vector?
Yes, right now we pass the whole vector.
Are you proposing the following logic:
- we slice in the generic
- the methods only ever see a truncated version of the vector
obj_print_footer()is no longer responsible for printing the informative line- the generic prints the informative line after all methods have been called
?
I rather like that.
yup exactly