User Tools

Site Tools


python:about_python:about_python_iv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
python:about_python:about_python_iv [2014/02/28 22:18] – [Inheritance] mithatpython:about_python:about_python_iv [2019/06/21 23:09] (current) – [Inheritance in Python] mithat
Line 43: Line 43:
 To demonstrate the use of inheritance in Python, we are going to create a specialized version of ''ClickerCounter'' called ''ClickUpDown''. To demonstrate the use of inheritance in Python, we are going to create a specialized version of ''ClickerCounter'' called ''ClickUpDown''.
  
-<img src="images/clickupdown.png" title="ClickUpDown heirarchy" alt="ClickUpDown heirarchy" />  +{{:python:about_python:clickupdown-tree.png?direct|}} 
  
 In addtion to the two buttons found on a ''ClickerCounter'' (for incrementing and resetting the count), a ''ClickUpDown'' object will add another that resets the count. In terms of a Python model, a ''ClickUpDown'' is identical to a ''ClickerCounter'' except that it has an additional method: ''click_down''. In addtion to the two buttons found on a ''ClickerCounter'' (for incrementing and resetting the count), a ''ClickUpDown'' object will add another that resets the count. In terms of a Python model, a ''ClickUpDown'' is identical to a ''ClickerCounter'' except that it has an additional method: ''click_down''.
python/about_python/about_python_iv.txt · Last modified: 2019/06/21 23:09 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki