dotfiles/.emacs.d/snippets/python-mode/prop

18 lines
304 B
Plaintext
Raw Normal View History

2017-12-21 17:29:29 +01:00
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# name: prop
# --
def ${1:foo}():
doc = """${2:Doc string}"""
def fget(self):
return self._$1
def fset(self, value):
self._$1 = value
def fdel(self):
del self._$1
return locals()
$1 = property(**$1())
$0