File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1+ Add a new simple snippet for ` if __name__ == '__main__': `  block. The snippet can be accessed by typing ` __main__ ` 
2+ (thanks [ R S Nikhil Krishna] ( https://github.com/rsnk96/ ) )
Original file line number Diff line number Diff line change 184184 "description" : " Code snippet for a lambda statement" 
185185 },
186186 "if(main)" : {
187-  "prefix" : " if(main) " 
187+  "prefix" : " __main__ " 
188188 "body" : [
189-  " def main():" 
190-  " \t ${1:pass}" 
191-  " " 
192-  " if __name__ == '__main__':" 
193-  " \t main()" 
189+  " if __name__ == \" __main__\" :" 
190+  "  ${1:pass}" 
194191 ],
195-  "description" : " Code snippet for a main function " 
192+  "description" : " Code snippet for a `if __name__ ==  \" __main__ \" : ...` block " 
196193 },
197194 "async/def" : {
198195 "prefix" : " async/def" 
                         You can’t perform that action at this time. 
           
                  
0 commit comments