22 lines
262 B
Python
22 lines
262 B
Python
'''
|
|
Created on 11.06.2015
|
|
|
|
@author: dehottgw
|
|
'''
|
|
|
|
class A(object):
|
|
def __init__(self, x):
|
|
self.x = x
|
|
|
|
def out(self):
|
|
print("X is %s" % self.x)
|
|
|
|
class B(A):
|
|
pass
|
|
|
|
|
|
a = A('abc')
|
|
a.out()
|
|
|
|
b = B('xyz')
|
|
b.out() |