Skip to content

Instantly share code, notes, and snippets.

View naufraghi's full-sized avatar

Matteo Bertini naufraghi

View GitHub Profile
# This is the "normal" way
class C(object):
def __init__(self):
self._x = None
@property
def x(self):
return self._x
@x.setter # will copy C.x and add the setter
def x(self, value):
self._x = value