1234567891011121314151617 |
- # -*- mode: snippet -*-
- # This was cloned from a TextMate bundle for yasnippet.
- #key : property
- #name : New Property
- #expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
- # --
- 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
|