|
121 | 121 | "body":"while ${1:condition}:\n\t${2:pass}$0", |
122 | 122 | "description" :"Code snippet to create a while loop structure." |
123 | 123 | }, |
| 124 | +"dowhile": { |
| 125 | +"prefix":"dowhile", |
| 126 | +"body":"do = True\nwhile do or ${2:condition}:\n\tdo = False\n\t${1:body}$0", |
| 127 | +"description" :"Code snippet to create a do-while loop structure." |
| 128 | + }, |
124 | 129 | "try:except:": { |
125 | 130 | "prefix":"try", |
126 | 131 | "body":"try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}$0", |
|
155 | 160 | "prefix":"ifmain", |
156 | 161 | "body":"if __name__ ==\"__main__\":\n\t${1:main()}$0", |
157 | 162 | "description" :"Create implicitly all the code at the top level using the __name__ special variable." |
| 163 | + }, |
| 164 | +"lambda": { |
| 165 | +"prefix":"lam", |
| 166 | +"body":"lambda ${1:args}: ${2:expr}", |
| 167 | +"description":"Create template for lambda function" |
158 | 168 | } |
159 | 169 | } |