Skip to content

Commit a10dfbc

Browse files
committed
[add] if statement snippet
1 parent 5c0377c commit a10dfbc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

snippets/language-python.cson

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
'New Property':
2727
'prefix': 'property'
2828
'body': 'def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n def fdel(self):\n ${5:del self._$1}\n return locals()\n$1 = property(**$1())$0'
29+
'if':
30+
'prefix': 'if'
31+
'body': 'if ${1:condition}:\n\t${2:pass}'
2932
'Try/Except/Else/Finally':
3033
'prefix': 'try'
3134
'body': 'try:\n\t${1:pass}\nexcept${2: ${3:Exception} as ${4:e}}:\n\t${5:raise}\nelse:\n\t${6:pass}\nfinally:\n\t${7:pass}'

0 commit comments

Comments
 (0)