mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Added a snippet 'prop' for python-mode
This commit is contained in:
parent
a01b5eb76c
commit
42bb30967b
15
snippets/text-mode/python-mode/prop
Normal file
15
snippets/text-mode/python-mode/prop
Normal file
@ -0,0 +1,15 @@
|
||||
# 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
|
Loading…
x
Reference in New Issue
Block a user