Object Oriented Programming/Properties

Properties in OOP are also able to be looked at as functions, a property houses a function that can have its procedures or variables altered without directly going to the code and editing it. A property can be changed or updated based on user input which allows for a lot of user-interactive programs and applications.

class Marker():

@property
def marker_color(self):
    return self._marker_color

@color.setter
def color(self, color):
    self._marker_color = Blue
    self._marker_color = Red


See AlsoEdit

Wikipedia:Property(programming)

Python Programming/Classes