On 7/12/07, Larry Bates <[EMAIL PROTECTED]> wrote: > sizeof() in Python is len()
No, sizeof in C/C++ is not like len (len is more like strlen). For example, on my computer compiling #include <stdio.h> #include <string.h> int main(int argc, char ** argv) { char * hello = "Hello World"; printf("sizeof: %d\n", sizeof(hello)); printf("strlen: %d\n", strlen(hello)); return 0; } prints out 11 for strlen but only 4 for sizeof because that is the size of a char *. AFAIK there isn't a true equivalent to sizeof in python (I hear there is an implementation in mxtools, however). -- Evan Klitzke <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list