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 11:34:43 2014 -0600 @@ -3317,8 +3317,13 @@ 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 sure it's a valid expression. + try: + eval(default) + except SyntaxError: + bad = True + except Exception: + bad = False # probably if bad: fail("Unsupported expression as default value: " + repr(default))