[Tutor] __init__

Alan Gauld alan.gauld at yahoo.co.uk
Mon Aug 29 18:10:30 EDT 2016


On 29/08/16 20:03, monikajg at netzero.net wrote:

> If __init__ is not defined in a class, will it be called when creating an instance?
> What in a case if this class inherits from parent with __init__ and without __init__?

The easiest way to find out is try it and see what happens!

Just put appropriate print statements in the method.

Alan G



More information about the Tutor mailing list