Santiago Romero schrieb:
Is there a Python version of C's language #define statements?
Example:
#define ReadMem( (x) ) memory[ (x) ]
Instead of using a function, when you call to ReadMem(), the code is
INCLUDED, (no function is called, the "compiler" just substitues the
ReadMem( expression ) with memory[ (expression) ] .
I want to avoid function calls to speed up a program by sacrifizing
the resulting size ...
Is that possible?
Not without taking the extra step of a ... preprocessor. As C does.
Diez
--
http://mail.python.org/mailman/listinfo/python-list