[Tutor] ifdef in python

Kent Johnson kent37 at tds.net
Wed Oct 21 21:36:50 CEST 2009

On Wed, Oct 21, 2009 at 3:26 PM, Lizhi Yang <yanglizhi at gmail.com> wrote:
> Is there anything similar to ifdef statement in C or C++ in python?

No, Python doesn't have a preprocessor. Can you say why you want it?
You may be able to do what you want using an ordinary if statement,
for example you can conditionally import or define objects.


More information about the Tutor mailing list