From deadccf0a7a974f8b5da268d3601031e0343c263 Mon Sep 17 00:00:00 2001 From: Waldecir Santos Date: Sat, 16 Jul 2011 12:21:36 -0300 Subject: [PATCH] More python snippets --- snippets/python.snippets | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/snippets/python.snippets b/snippets/python.snippets index 128b526..f0965fe 100644 --- a/snippets/python.snippets +++ b/snippets/python.snippets @@ -53,6 +53,33 @@ snippet property ${3:return self._$1} def fset(self, value): ${4:self._$1 = value} +# Ifs +snippet if + if ${1:condition}: + ${2:code...} +snippet ifelse + if ${1:condition}: + ${2:code...} + else: + ${3:code...} +snippet ifelif + if ${1:condition}: + ${2:code...} + elif ${3:condition}: + ${4:code...} + else: + ${5:code..} +# For +snippet for + for ${1:item} in ${2:items} + ${3:code...} +# Encodes +snippet cuft8 + # -*- coding: utf-8 -*- +snippet clatin1 + # -*- coding: latin-1 -*- +snippet cascii + # -*- coding: ascii -*- # Lambda snippet ld ${1:var} = lambda ${2:vars} : ${3:action}