Objects and validation
python at lists.fastmail.net
python at lists.fastmail.net
Sun Dec 12 09:28:29 EST 2010
I have a routine in Python which is extracting information from a
website. This information is read and inserted into objects.
I currently have all the validations and checks implemented in the
routines which are reading the HTML and creating the objects. It is
however also possible to move all the validations into the class itself.
What is considered the best practice for this: validation in the
functions which read the information and creates the objects or in the
class itself?
Thijs
More information about the Python-list
mailing list