What is the difference between Explicit attribute vs @Property in Python?
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
class Geometry(object):
# Explicit attribute:
geo_color = "green"
# Property:
@property
def color(self):
return self._color
@color.setter
def color(self, value):
self._color = value
#
class Line(Geometry):
def Draw(self, Point1, Point2):
# draw line ...
pass
line = Line()
line.geo_color = "white"
color = line.geo_color
print line.geo_color
print color