File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 34
34
' #!/usr/bin/env python' :
35
35
' prefix' : ' env'
36
36
' body' : ' #!/usr/bin/env python\n '
37
+ ' #!/usr/bin/env python3' :
38
+ ' prefix' : ' env3'
39
+ ' body' : ' #!/usr/bin/env python3\n '
37
40
' # coding=utf-8' :
38
41
' 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}'
40
49
' Assert Equal' :
41
50
' prefix' : ' ase'
42
51
' body' : ' self.assertEqual(${1:expected}, ${2:actual}${3:, \' ${4:message}\' })$0'
97
106
' while' :
98
107
' prefix' : ' while'
99
108
' 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}'
100
112
' Try/Except/Else/Finally' :
101
113
' prefix' : ' tryef'
102
114
' 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}'
118
130
' Dictionary Comprehension' :
119
131
' prefix' : ' dc'
120
132
' 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}}'
121
136
' PDB set trace' :
122
137
' prefix' : ' pdb'
123
138
' body' : ' import pdb; pdb.set_trace()\n '
124
139
' iPDB set trace' :
125
140
' prefix' : ' ipdb'
126
141
' 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()'
127
148
' __magic__' :
128
149
' prefix' : ' __'
129
150
' body' : ' __${1:init}__'
You can’t perform that action at this time.
0 commit comments