mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
two new snippet for python mode from user
This commit is contained in:
parent
fdb17ae897
commit
2558475460
9
snippets/text-mode/python-mode/propg
Normal file
9
snippets/text-mode/python-mode/propg
Normal file
@ -0,0 +1,9 @@
|
||||
#contributor : Julio Carlos Menendez <godinblack@gmail.com>
|
||||
#name : _get_foo ... foo=property(...)
|
||||
# --
|
||||
def _get_${1:foo}(self):
|
||||
return self._$1
|
||||
|
||||
$1 = property(_get_$1)
|
||||
|
||||
$0
|
12
snippets/text-mode/python-mode/propsg
Normal file
12
snippets/text-mode/python-mode/propsg
Normal file
@ -0,0 +1,12 @@
|
||||
#contributor : Julio Carlos Menendez <godinblack@gmail.com>
|
||||
#name : _get_foo ... _set_foo ... foo=property(...)
|
||||
# --
|
||||
def _set_${1:foo}(self, value):
|
||||
self._$1 = value
|
||||
|
||||
def _get_$1(self):
|
||||
return self._$1
|
||||
|
||||
$1 = property(_get_$1, _set_$1)
|
||||
|
||||
$0
|
Loading…
x
Reference in New Issue
Block a user