2. member variable


#1

class Car(object):
     condition="new"
     my_car=Car()

Oops, try again. my_car does not appear to be an instance of Car......can you tell me the problem!


#2

That line should not be indented since that puts the instance inside the class definition (a circular reference). Remove the indentation.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.