daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest May 17th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. snippet     class
  2. abbr        class Class(...): ...
  3.     class ${1:Name}(${2:object}):
  4.         """${3:class documentation}"""
  5.         def __init__(self, ${4}):
  6.             """${5:__init__ documentation}"""
  7.             ${6:pass}
  8.  
  9. snippet     def
  10. abbr        def function(...): ...
  11.     def ${1:name}(${2}):
  12.         """${3:function documentation}"""
  13.         ${4:pass}
  14.  
  15. snippet     defm
  16. abbr        def method(self, ...): ...
  17.     def $(1:name}(self, ${2}):
  18.         """${3:method documentation}"""
  19.         ${4:pass}
  20.  
  21. snippet     elif
  22. abbr        elif ...: ...
  23.     elif ${1:condition}:
  24.         ${2:pass}
  25.  
  26. snippet     else
  27. abbr        else: ...
  28.     else:
  29.         ${1:pass}
  30.  
  31. snippet     fileidiom
  32. abbr        f = None try: f = open(...) finally: ...
  33.     ${1:f} = None
  34.     try:
  35.         $1 = open(${2})
  36.         ${3}
  37.     finally:
  38.         if $1:
  39.             $1.close()
  40.  
  41. snippet     for
  42. abbr        for ... in ...: ...
  43.     for ${1:value} in ${2:list}:
  44.         ${3:pass}
  45.  
  46. snippet     if
  47. abbr        if ...: ...
  48.     if ${1:condition}:
  49.         ${2:pass}
  50.  
  51. snippet     ifmain
  52. abbr        if __name__ == '__main__': ...
  53.     if __name__ == '__main__':
  54.         ${1:pass}
  55.  
  56. snippet     tryexcept
  57. abbr        try: ... except ...: ...
  58.     try:
  59.         ${1:pass}
  60.     except ${2:ExceptionClass}:
  61.         ${3:pass}
  62.  
  63. snippet     tryfinally
  64. abbr        try: ... finally: ...
  65.     try:
  66.         ${1:pass}
  67.     finally:
  68.         ${2:pass}
  69.  
  70. snippet     while
  71. abbr        while ...: ...
  72.     while ${1:condition}:
  73.         ${2:pass}
RAW Paste Data
Top