]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/yasnippet/snippets/python-mode/propsg
Add yasnippet.
[gnu-emacs-elpa] / packages / yasnippet / snippets / python-mode / propsg
diff --git a/packages/yasnippet/snippets/python-mode/propsg b/packages/yasnippet/snippets/python-mode/propsg
new file mode 100644 (file)
index 0000000..876c139
--- /dev/null
@@ -0,0 +1,13 @@
+# contributor: Julio Carlos Menendez <godinblack@gmail.com>
+# name: _get_foo ... _set_foo ... foo=property(...)
+# key: propsg
+# --
+def _set_${1:foo}(self, value):
+    self._$1 = value
+
+def _get_$1(self):
+    return self._$1
+
+$1 = property(_get_$1, _set_$1)
+
+$0
\ No newline at end of file