Deprecated form of raising exception (W602)
The raise Exception, message
form of raising exceptions is deprecated. Use the new form.
Anti-pattern
def can_drive(age):
if age < 16:
raise ValueError, 'Not old enough to drive'
return True
Best practice
def can_drive(age):
if age < 16:
raise ValueError('Not old enough to drive')
return True