User Tools

Site Tools


python:python_misc:properties_in_python_classes

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
python:python_misc:properties_in_python_classes [2019/02/19 22:59] mithatpython:python_misc:properties_in_python_classes [2019/02/19 23:12] mithat
Line 1: Line 1:
 +Good writeups:
 +  * https://stackabuse.com/the-python-property-decorator/
 +  * https://www.programiz.com/python-programming/property
 +
 <code python> <code python>
 class ClickerCounter(): class ClickerCounter():
Line 7: Line 11:
     def click(self):     def click(self):
         """         """
-        Click the counter: advance the count by one and reset if +        Advance the count by one and reset if over the upper limit.
-        over the upper limit.+
         """         """
         self.count = self.count + 1         self.count = self.count + 1
python/python_misc/properties_in_python_classes.txt · Last modified: 2019/06/21 23:16 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki