Denis Doria a écrit :
Hi;

I'm checking the best way to validate attributes inside a class. Of
course I can use property to check it, but I really want to do it
inside the __init__:

If you use a property, you'll have the validation in the initializer AND everywhere else too. If you care about validating the attribute in the initializer then you probably want to make sure the attribute is _always_ valid, don't you ???
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to