Message93164
I've sometimes found it useful to define a convenience macro named
Py_RETURN_BOOL(x) which is essentially:
#define Py_RETURN_BOOL(x) if (x) Py_RETURN_TRUE; else Py_RETURN_FALSE
It's useful for implementing functions which return Boolean values based
on simple conditions.
I think it's readable and doesn't detract from regular program flow,
although it does hide the condition behind a macro, which detracts a bit
from the code's debug-ability. |
|
Date |
User |
Action |
Args |
2009-09-27 00:05:00 | jon | set | recipients:
+ jon |
2009-09-27 00:04:59 | jon | set | messageid: <1254009899.52.0.128079117198.issue7004@psf.upfronthosting.co.za> |
2009-09-27 00:04:58 | jon | link | issue7004 messages |
2009-09-27 00:04:57 | jon | create | |
|