[Python-ideas] Specify number of items to allocate for array.array() constructor
Georg Brandl
g.brandl at gmx.net
Fri Jul 22 21:04:29 CEST 2011
Am 22.07.2011 20:27, schrieb Alex Gaynor:
> Philip Jenvey <pjenvey at ...> writes:
>> +1, Jython's had a custom function for this forever, originally from its old
> jarray module:
>> jarray.zeros(length, typecode). I think its swapped order of args are due to
> jarray probably predating
>> the array module.
>>
>> --
>> Philip Jenvey
>>
>
>
> array.zeroes(typecode, length) seems like a good API to me. It's also
> consistant with the name for the numpy method which does the same.
Would have to be array.zeros() then :)
Georg
More information about the Python-ideas
mailing list