data validation when creating an object

Terry Reedy tjreedy at udel.edu
Wed Jan 15 22:46:45 EST 2014


On 1/15/2014 8:09 PM, Rita wrote:

> I know its frowned upon to do work in the __init__() method and only
> declarations should be there.

Dear Python beginners:

Don't believe the Python rules people write unless it is by one of the 
core developers or one of the other experts posting here. Even then, be 
skeptical. Even these people disagree on some guidelines.

PS. The basic guideline is that your program should work correctly, and 
some people have disputed even that ;-)

-- 
Terry Jan Reedy





More information about the Python-list mailing list