[Tutor] Puzzled

Kent Johnson kent37 at tds.net
Sat Aug 30 02:47:11 CEST 2008


On Fri, Aug 29, 2008 at 6:15 PM, ammar azif <ceasar102 at yahoo.com> wrote:
> Thanks for the explanation. Btw, How can I get the size of python primitive
> data types in bytes? Is it defined somewhere in a file that I can look at?

Not really. sys.maxint gives the largest int, from which you can infer the size.

Here is a (complex) recipe that reports sizes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530

Kent


More information about the Tutor mailing list