July 18, 2016
8:45 p.m.
On Mon, Jul 18, 2016 at 4:17 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
- 'bytes.zeros' renamed to 'bytes.size', with option byte filler (defaults to b'\x00')
Seriously? You went from a numpy-friendly feature to something rather numpy-hostile. In numpy, ndarray.size is an attribute that returns the number of elements in the array. The constructor that creates an arbitrary repeated value also exists and is called numpy.full(). Even ignoring numpy, bytes.size(count, value=b'\x00') is completely unintuitive. If I see bytes.size(42) in someone's code, I will think: "something like int.bit_length(), but in bytes."