Python Phrase Drills

The flashcards below were created by user Anonymous on FreezingBlue Flashcards.

  1. class X(Y)
    "Make a class named X that is-a Y."
  2. class X(object):
        def__init__(self, J)
    "class X has-a __init__ that takes self and J parameters."
  3. class X(object):
        def M(self, J)
    "class X has-a function named M that takes self and J parameters."
  4. foo = X()
    "Set foo to an instance of class X."
  5. foo.M(J)
    "From foo get the M function, and call it with parameters self, J."
  6. foo.k = Q
    "From foo get the k attribute and set it to Q."
Card Set
Python Phrase Drills
Python phrase drills for classes
Show Answers