File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 3434 ' #!/usr/bin/env python' :
3535 ' prefix' : ' env'
3636 ' body' : ' #!/usr/bin/env python\n '
37+ ' #!/usr/bin/env python3' :
38+ ' prefix' : ' env3'
39+ ' body' : ' #!/usr/bin/env python3\n '
3740 ' # coding=utf-8' :
3841 ' prefix' : ' enc'
39- ' body' : ' # coding=utf-8\n '
42+ ' body' : ' # -*- coding: utf-8 -*-\n '
43+ ' Import' :
44+ ' prefix' : ' im'
45+ ' body' : ' import ${1:package/module}'
46+ ' From/Import' :
47+ ' prefix' : ' fim'
48+ ' body' : ' from ${1:package/module} import ${2:names}'
4049 ' Assert Equal' :
4150 ' prefix' : ' ase'
4251 ' body' : ' self.assertEqual(${1:expected}, ${2:actual}${3:, \' ${4:message}\' })$0'
97106 ' while' :
98107 ' prefix' : ' while'
99108 ' body' : ' while ${1:condition}:\n\t ${2:pass}'
109+ ' with statement' :
110+ ' prefix' : ' with'
111+ ' body' : ' with ${1:expression} as ${2:target}:\n\t ${3:pass}'
100112 ' Try/Except/Else/Finally' :
101113 ' prefix' : ' tryef'
102114 ' body' : ' try:\n\t ${1:pass}\n except${2: ${3:Exception} as ${4:e}}:\n\t ${5:raise}\n else:\n\t ${6:pass}\n finally:\n\t ${7:pass}'
118130 ' Dictionary Comprehension' :
119131 ' prefix' : ' dc'
120132 ' body' : ' {${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:variable}}'
133+ ' Set Comprehension' :
134+ ' prefix' : ' sc'
135+ ' body' : ' {${1:value} for ${2:value} in ${3:variable}}'
121136 ' PDB set trace' :
122137 ' prefix' : ' pdb'
123138 ' body' : ' import pdb; pdb.set_trace()\n '
124139 ' iPDB set trace' :
125140 ' prefix' : ' ipdb'
126141 ' body' : ' import ipdb; ipdb.set_trace()\n '
142+ ' rPDB set trace' :
143+ ' prefix' : ' rpdb'
144+ ' body' : ' import rpdb2; rpdb2.start_embedded_debugger(\' ${1:debug_password}\' )$0'
145+ ' PuDB set trace' :
146+ ' prefix' : ' pudb'
147+ ' body' : ' import pudb; pudb.set_trace()'
127148 ' __magic__' :
128149 ' prefix' : ' __'
129150 ' body' : ' __${1:init}__'
You can’t perform that action at this time.
0 commit comments