[issue12615] add array.zeroes

2011-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Array has been around for a very long time and this functionality has never been requested. That and the fact that we already have a way to do it (the same way as for lists) is a strong indication that this isn't needed at all. -- resolution: ->

[issue12615] add array.zeroes

2011-07-25 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12615] add array.zeroes

2011-07-25 Thread Nick Coghlan
Nick Coghlan added the comment: Compare however the behaviour of bytes() and bytearray() which support direct zero initialisation of a region of memory by passing an integer to their constructor. -- nosy: +ncoghlan ___ Python tracker

[issue12615] add array.zeroes

2011-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 Array's API much more closely matches that of list than it does numpy's arrays which are profoundly different. So we should stick the one-way-to-do-it idiom: array.array('c', '\0') * 100 or array.array('d', [0.0]) * 100. Also, the current idiom is mu

[issue12615] add array.zeroes

2011-07-22 Thread Alex Gaynor
New submission from Alex Gaynor : >From python-ideas: introduce array.zeroes, a new classmethod that provides an alternative constructor, its signature is zeroes(typecode, length), which allows for preallocating an array, with a lower overhead than methods such as array(typecode, [0]) * lengt