property 438 B

1234567891011121314151617
  1. # -*- mode: snippet -*-
  2. # This was cloned from a TextMate bundle for yasnippet.
  3. #key : property
  4. #name : New Property
  5. #expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
  6. # --
  7. def ${1:foo}():
  8. doc = "${2:The $1 property.}"
  9. def fget(self):
  10. ${3:return self._$1}
  11. def fset(self, value):
  12. ${4:self._$1 = value}
  13. def fdel(self):
  14. ${5:del self._$1}
  15. return locals()
  16. $1 = property(**$1())$0