Author schuppenies
Recipients georg.brandl, schuppenies
Date 2008-05-17.11:00:24
SpamBayes Score 0.00126034
Marked as misclassified No
Message-id <1211022029.77.0.684293335319.issue2898@psf.upfronthosting.co.za>
In-reply-to
Content
> Can't you write this as a simple Python function using
> type.__basicsize__ and type.__itemsize__?

Yes, it would be possible and has been done, e.g.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530. The
problem is though, that it requires handling of all special cases
externally. Any changes need to be addressed separately and unknown type
definitions cannot be addressed at all. Also I figured the programmer
implementing a type would know best about its size. Another point is
different architectures which result in different object sizes.

> In any case, if this is added somewhere it should not be a builtin.

What place would you consider to be appropriate?
History
Date User Action Args
2008-05-17 11:00:32schuppeniessetspambayes_score: 0.00126034 -> 0.00126034
recipients: + schuppenies, georg.brandl
2008-05-17 11:00:29schuppeniessetspambayes_score: 0.00126034 -> 0.00126034
messageid: <1211022029.77.0.684293335319.issue2898@psf.upfronthosting.co.za>
2008-05-17 11:00:27schuppenieslinkissue2898 messages
2008-05-17 11:00:25schuppeniescreate