mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-12 16:34:18 +00:00
Last commit before tagging and releasing
This commit is contained in:
15
extras/imported/python-mode/Idioms/New Property.yasnippet
Normal file
15
extras/imported/python-mode/Idioms/New Property.yasnippet
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: property
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: New Property
|
||||
# --
|
||||
def ${1:foo}():
|
||||
doc = "${2:The $1 property.}"
|
||||
def fget(self):
|
||||
${3:return self._$1}
|
||||
def fset(self, value):
|
||||
${4:self._$1 = value}
|
||||
def fdel(self):
|
||||
${5:del self._$1}
|
||||
return locals()
|
||||
$1 = property(**$1())$0
|
||||
Reference in New Issue
Block a user