Phase Drills Flashcards
1
Q
class X(object): def __init__(self, J)
A
class X has-a __init__ that takes self and J parameters
2
Q
classX(object): def M(self, J)
A
class X has-a function named M that takes self and J parameters
3
Q
foo = X()
A
Set foo to an instance of class X
4
Q
foo.M(J)
A
From foo, get the M function, and call it with parameters self, J
5
Q
foo.K = Q
A
From foo, get the K attribute, and set it to Q
6
Q
Class X(Y)
A
Make a class named X that is-a Y