value = value.lower()
if value in ("true", "yes"): return True
elif value in ("false", "no"): return False
- raise ValueError("%s directive must be set to True or False, got %r" % (
+ raise ValueError("%s directive must be set to True or False, got '%s'" % (
name, orig_value))
elif type is int:
try:
return int(value)
except ValueError:
- raise ValueError("%s directive must be set to an integer, got %r" % (
+ raise ValueError("%s directive must be set to an integer, got '%s'" % (
name, orig_value))
elif type is str:
return str(value)
# cython: boundscheck = true
_ERRORS = u"""
-3:0: boundscheck directive must be set to True or False
-4:0: boundscheck directive must be set to True or False
+3:0: boundscheck directive must be set to True or False, got 'true'
+4:0: boundscheck directive must be set to True or False, got '9'
"""
-