Are C style macros available in Python?

Posted by Dragos Toader on Stack Overflow See other posts from Stack Overflow or by Dragos Toader
Published on 2010-05-27T21:39:15Z Indexed on 2010/05/27 21:41 UTC
Read the original article Hit count: 241

Filed under:
|
|

In C there's a way to #define macros:

#define OBJWITHSIZE(_x) (sizeof _x)/(sizeof _x[0])

Is there a way to do this in Python?

© Stack Overflow or respective owner

Related posts about python

Related posts about macros