On 03/08/09 04:07, Dag Sverre Seljebotn wrote:
> Anyway, I feel myself that this has a better feel than a new array type,
> as it makes use of the buffer interface and so bridges better with
> Python-land.
> 
> My proposal is here:
> http://wiki.cython.org/enhancements/buffersyntax

This looks really nice.  I'm just a little curious about one little 
feature, would this support resizing the buffer?  i.e. could I do

  def f(int[:] arr):
      cdef int i
      # ...
      arr.append(i)

say?  My guess is no but this would be really handy.  I sometimes need a 
fast resizable container for basic types and find that using a list is 
about 4-7 times slower than a simple class exposing a block of memory 
with suitable resizing.  Creating such a container is easy for one type 
but without a templating system this gets too messy when I want support 
for ints, longs, floats and doubles.

cheers,
prabhu
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to