[Chicago] Python/Mono slapdown [no pycon content]

Michael Tobis mtobis at gmail.com
Fri Mar 7 03:38:58 CET 2008


On Thu, Mar 6, 2008 at 8:15 PM, Martin Maney <maney at two14.net> wrote:


>  does this stretch to cover things less homogenous
> than arrays?  Or, as would often be the case I think, arrays of binary
> structs - still a fixed layout, say, but not just X integers, all
> alike.
>

Yup, as long as the number of bytes per element is fixed.

>
> > I also think with buffer or array, and the struct module, you can do
> > this on your own.
>
> But again, if the app's main, large data store is this big array of
> binary structs, then a more C-like view of data (as I believe C# has)
> will have a better match to it.


You get some nice things, like complex slices and arbitrary subsets without
copy, elementwise loops, and very high level notation (ufuncs).

 And I'm not saying that to argue that
> Python ought to have a more C-like data model, just that it's IMO well
> chosen level of abstraction inherently makes it less convenient to deal
> with this sort of structured binary data.


There is a cost. It's not an entirely Pythonic way of looking at things. It
has advantages though, especially if there is an underlying rectangular or
multi-dimensional rectangular structure to the data.

mt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/chicago/attachments/20080306/f430e5c0/attachment.htm 


More information about the Chicago mailing list