What sort of exception should a class raise in __init__() when it
can't find an appropriate set of data for the parameter passed in to
the class instantiation?

E.g. I have a database with some names and address in and have a
class Person that gets all the details for a person given their
name.

     ....
     ....
     person.Person('Fred')
     ...
     ...


If Fred doesn't exist in the database what sort of exception should
there be?  Is it maybe a ValueError?


-- 
Chris Green
ยท
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to