On Thu, Oct 3, 2019 at 7:33 AM Antoine Pitrou <anto...@python.org> wrote: > > > Le 03/10/2019 à 14:22, Wes McKinney a écrit : > > On Thu, Oct 3, 2019 at 4:26 AM Antoine Pitrou <anto...@python.org> wrote: > >> > >> > >> Yeah, I think the spec should be strict. And for convenience, I'd say > >> it should probably be the padded length (though I don't have a strong > >> opinion). > > > > The reason I'm against this is that it makes it impossible for a > > producer to preserve the exact state of its buffers for a consumer. > > > > For example, if you have a 1-byte validity bitmap, and you do not have > > the flexibility to indicate in the metadata that the length is either > > 1 (unpadded) or 8 (padded), then the producer only will ever see 8 > > bytes. > > I see. Then we should mandate the non-padded length, IMHO.
I think all that needs to be said is that an unpadded size is not invalid. If a consumer is passed a buffer that is larger than it needs to be, there is no harm done. I can tweak the language so that there is less uncertainty perhaps > Regards > > Antoine.