Python Phrase Drills

Card Set Information

Author:
Anonymous
ID:
280827
Filename:
Python Phrase Drills
Updated:
2014-08-18 15:28:01
Tags:
python phrase drills
Folders:

Description:
Python phrase drills for classes
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards. What would you like to do?


  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."

What would you like to do?

Home > Flashcards > Print Preview