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