We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89ff074 commit 1648b3aCopy full SHA for 1648b3a
snippets/python.snippets
@@ -85,16 +85,15 @@ snippet adefm
85
86
# New Property
87
snippet property
88
- def ${1:foo}():
89
- doc = "${2:The $1 property.}"
90
- def fget(self):
91
- ${3:return self._$1}
92
- def fset(self, value):
93
- ${4:self._$1 = value}
94
- def fdel(self):
95
- ${0:del self._$1}
96
- return locals()
97
- $1 = property(**$1())
+ @property
+ def ${1:foo}(self) -> ${2:type}:
+ """${3:doc}"""
+ return self._${1:foo}
+
+ @${1:foo}.setter
+ def ${1:foo}(self, value: ${2:type}):
+ self._${1:foo} = value
98
# Ifs
99
snippet if
100
if ${1:condition}:
0 commit comments