The best way to do this is probably to write a method that checks the equality of the 3 different ambiguous cases:
from dateutil import parser
def parse(string, agnostic=True, **kwargs):
if agnostic or parser.parse(string, **kwargs) == parser.parse(string, yearfirst=True, **kwargs) == parser.parse(string, dayfirst=True, **kwargs):
return parser.parse(string, **kwargs)
else:
raise ValueError("The date was ambiguous: %s" % string)