Created
November 22, 2011 18:12
-
-
Save gumeniukcom/1386401 to your computer and use it in GitHub Desktop.
mashinko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = '[email protected]' | |
# -*- coding: utf-8 -*- | |
class Car(object): | |
message = "Привет, я машинко" | |
def who(self): | |
print self.message | |
class DriftCar(Car): | |
def __init__(self): | |
self.message = "Я супер машинка" | |
class Buldozer(Car): | |
def __init__(self): | |
self.message = "А я бульдозер" | |
qwe = Car() | |
asd = DriftCar() | |
zxc = Buldozer() | |
qwe.who() | |
asd.who() | |
zxc.who() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment