Can i mask the parent attibutes in the child. let me give a quick example.

In [1]: class a:
   ...:     value1 = 1
   ...:     value2 = 2
   ...:

In [2]: class b(a):
   ...:     value3 = 3
   ...:

In [3]: obj1 = b()

In [4]: obj1.value1
Out[4]: 1

In [5]: obj1.value2
Out[5]: 2

In [6]: obj1.value3
Out[6]: 3

If you notice in the below example you will see that the child class object
``obj1`` has inherited all the attibutes of the parent class. Is there a
way by which i can make the child class not inherit some of the properites
of parent class.


-- 
D. Santosh Kumar
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to