[Tutor] Superclass call problem

Alan Harris-Reid aharrisreid at googlemail.com
Sat Feb 20 20:53:57 CET 2010


Kent Johnson wrote:
> On Sat, Feb 20, 2010 at 12:50 PM, Alan Harris-Reid
> <aharrisreid at googlemail.com> wrote:
>   
>> Hi,
>>
>> I am having trouble understanding how superclass calls work.  Here's some
>> code...
>>
>> class ParentClass():
>>   def __init__(self):
>>       do something here
>>     
>
> You should inherit object to use super():
> class ParentClass(object):
>
> Kent

Hi Kent, thanks for the reply,

Sorry, left out 'object' from my example.  The actual code already reads
class ParentClass(object):

Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100220/3d2c0df9/attachment.htm>


More information about the Tutor mailing list