diff -r 9af7a7f14e94 Tools/clinic/clinic.py --- a/Tools/clinic/clinic.py Fri Jan 24 15:34:19 2014 +0100 +++ b/Tools/clinic/clinic.py Fri Jan 24 16:10:47 2014 -0600 @@ -3317,8 +3317,14 @@ bad = blacklist.bad else: # if they specify a c_default, we can be more lenient about the default value. - # but at least ensure that we can turn it into text and reconstitute it correctly. - bad = default != repr(eval(default)) + # but at least make an attempt at ensuring it's a valid expression. + bad = False + try: + eval(default) + except NameError: + pass # probably a named constant + except Exception: + bad = True if bad: fail("Unsupported expression as default value: " + repr(default))