1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-19 20:38:05 +01:00

updated Python snippets

This commit is contained in:
Michael Sanders
2009-04-05 10:57:48 -04:00
parent 58c76810be
commit f3777f928f

View File

@@ -1,11 +1,12 @@
# #!/usr/bin/python
snippet #!
#!/usr/bin/python
# While
snippet wh
while ${1:condition}:
${2:# code...}
snippet for
for ${1:needle} in ${2:haystack}:
${3:# code...}
# New Class
snippet cl
class ${1:ClassName}(${2:object}):
@@ -34,30 +35,26 @@ snippet property
# Self
snippet .
self.
# Try/Except
snippet try
snippet try Try/Except
try:
${1:pass}
except ${2:Exception}, ${3:e}:
${4:raise $3}
# Try/Except/Else
snippet trye
snippet try Try/Except/Else
try:
${1:pass}
except ${2:Exception}, ${3:e}:
${4:raise $3}
else:
${5:pass}
# Try/Except/Finally
snippet tryf
snippet try Try/Except/Finally
try:
${1:pass}
except ${2:Exception}, ${3:e}:
${4:raise $3}
finally:
${5:pass}
# Try/Except/Else/Finally
snippet tryef
snippet try Try/Except/Else/Finally
try:
${1:pass}
except ${2:Exception}, ${3:e}: