diff --git a/snippets/python.snippets b/snippets/python.snippets index b86b60c..af93a5b 100644 --- a/snippets/python.snippets +++ b/snippets/python.snippets @@ -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}: