From: John B. <jb...@te...> - 2006-02-21 17:27:45
|
I realize this is not the list for this question, but some of you might know, and I'm not currently on the Python list.... Can anyone tell me how Python implements C++ in the case of _tuples_? I'm assuming Python is built somewhat on C (or C++), and in C++ you can't return more than one item from a function, but Python allows one to return as many (up to 10?) variables as one wants (this is one reason Python is so "powerful"; returning three variables at once makes it a 'natural' for 3D space work with lots and lots of x,y,z dealings). I'm primarily curious (I don't have a problem in C++ other than lots more code to do the same things as I did in Python). I just would like to know if Python is 'behind the scenes' implementing something like a struct or a class and/or using ' return *this ' -type C++ things, in order to allow multiple outputs from functions. (Thanks, if anyone knows, and thanks, if I'm just stupid and Python isn't based on C anyway.) Peace JB jb...@te... Web: http://tetrahedraverse.com |