Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
oorrja
GitHub Repository: oorrja/learntosolveit
Path: blob/master/source/python/design_getattribute_example2.rst
1241 views
====================================================
Getattribute Example - Override access one attribute
====================================================

Question
--------

Override access to one of the attribute of the object and return
all other attributes from Super class.


Solution
--------

.. literalinclude:: ../../languages/python/design_getattribute_example2.py
   :language: python
   :tab-width: 4

.. runcode:: ../../languages/python/design_getattribute_example2.py
   :language: python
   :codesite: ideone

Explanation
===========







.. seealso::

   * :python-suggest-improve:`design_getattribute_example2.py`
   * :python-better-explain:`design_getattribute_example2.rst`