class Car(object):. def __init__(self, color, gears): # This is the constructor with 2 arguments as input. self.color = color # This is object attribute. ... <看更多>
There are several interacting considerations here: failure inside __init__ fails to construct the object; re-use of code; clear organisation ... ... <看更多>
While I'm not sure if it's even possible (why am I the only junior Python programmer searching/asking for that?), I'd like to know for sure ... ... <看更多>