In article <[email protected]>,
Jean-Michel Pichavant  <[email protected]> wrote:
>
>class A:
>    def __init__(self, foo = None, bar = None):
>        if len(foo) > 5:
>               raise ValueError('foo cannot exceed 5 characters')

Bad Idea -- what happens when foo is None?
-- 
Aahz ([email protected])           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to