I noticed something about conditional compilation in the recent patch from Stefan Behnel... maybe it's time to pipe up about this change I've been sitting on. The attached patch extends the Pyrex syntax to support three forms of 'directive', which allows some compile-time changes to the output. Now, Greg Ewing isn't a big fan of this - and I agree with him that conditionals are bad in many ways. I don't blame him in the least for not wanting this wart in his language. 8^) However, we desperately need this functionality for our work at IronPort... and the patch isn't all that large. We're currently using it for debugging, instrumentation, assertions, platform differentiation, etc... I hope others find it useful. The new syntax is: %define [] %if : [%else: ] %import There's a single global 'compile-time' namespace. For you can put just about anything you like, it's very flexible. [One sample I tried grepped through an include file - how's that for ugly!] The patch is against 0.9.3.1. A demo file with a setup.py is also included. Comments/feedback appreciated. -Sam