123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- import{g as c}from"./index-693c203b.js";function $(p,i){for(var n=0;n<i.length;n++){const t=i[n];if(typeof t!="string"&&!Array.isArray(t)){for(const e in t)if(e!=="default"&&!(e in p)){const o=Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(p,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var r={exports:{}};(function(p,i){ace.define("ace/snippets/python.snippets",["require","exports","module"],function(n,t,e){e.exports=`snippet #!
- #!/usr/bin/env python
- snippet imp
- import \${1:module}
- snippet from
- from \${1:package} import \${2:module}
- # Module Docstring
- snippet docs
- '''
- File: \${1:FILENAME:file_name}
- Author: \${2:author}
- Description: \${3}
- '''
- snippet wh
- while \${1:condition}:
- \${2:# TODO: write code...}
- # dowh - does the same as do...while in other languages
- snippet dowh
- while True:
- \${1:# TODO: write code...}
- if \${2:condition}:
- break
- snippet with
- with \${1:expr} as \${2:var}:
- \${3:# TODO: write code...}
- # New Class
- snippet cl
- class \${1:ClassName}(\${2:object}):
- """\${3:docstring for $1}"""
- def __init__(self, \${4:arg}):
- \${5:super($1, self).__init__()}
- self.$4 = $4
- \${6}
- # New Function
- snippet def
- def \${1:fname}(\${2:\`indent('.') ? 'self' : ''\`}):
- """\${3:docstring for $1}"""
- \${4:# TODO: write code...}
- snippet deff
- def \${1:fname}(\${2:\`indent('.') ? 'self' : ''\`}):
- \${3:# TODO: write code...}
- # New Method
- snippet defs
- def \${1:mname}(self, \${2:arg}):
- \${3:# TODO: write code...}
- # New Property
- snippet property
- def \${1:foo}():
- doc = "\${2:The $1 property.}"
- def fget(self):
- \${3:return self._$1}
- def fset(self, value):
- \${4:self._$1 = value}
- # Ifs
- snippet if
- if \${1:condition}:
- \${2:# TODO: write code...}
- snippet el
- else:
- \${1:# TODO: write code...}
- snippet ei
- elif \${1:condition}:
- \${2:# TODO: write code...}
- # For
- snippet for
- for \${1:item} in \${2:items}:
- \${3:# TODO: write code...}
- # Encodes
- snippet cutf8
- # -*- coding: utf-8 -*-
- snippet clatin1
- # -*- coding: latin-1 -*-
- snippet cascii
- # -*- coding: ascii -*-
- # Lambda
- snippet ld
- \${1:var} = lambda \${2:vars} : \${3:action}
- snippet .
- self.
- snippet try Try/Except
- try:
- \${1:# TODO: write code...}
- except \${2:Exception}, \${3:e}:
- \${4:raise $3}
- snippet try Try/Except/Else
- try:
- \${1:# TODO: write code...}
- except \${2:Exception}, \${3:e}:
- \${4:raise $3}
- else:
- \${5:# TODO: write code...}
- snippet try Try/Except/Finally
- try:
- \${1:# TODO: write code...}
- except \${2:Exception}, \${3:e}:
- \${4:raise $3}
- finally:
- \${5:# TODO: write code...}
- snippet try Try/Except/Else/Finally
- try:
- \${1:# TODO: write code...}
- except \${2:Exception}, \${3:e}:
- \${4:raise $3}
- else:
- \${5:# TODO: write code...}
- finally:
- \${6:# TODO: write code...}
- # if __name__ == '__main__':
- snippet ifmain
- if __name__ == '__main__':
- \${1:main()}
- # __magic__
- snippet _
- __\${1:init}__\${2}
- # python debugger (pdb)
- snippet pdb
- import pdb; pdb.set_trace()
- # ipython debugger (ipdb)
- snippet ipdb
- import ipdb; ipdb.set_trace()
- # ipython debugger (pdbbb)
- snippet pdbbb
- import pdbpp; pdbpp.set_trace()
- snippet pprint
- import pprint; pprint.pprint(\${1})\${2}
- snippet "
- """
- \${1:doc}
- """
- # test function/method
- snippet test
- def test_\${1:description}(\${2:self}):
- \${3:# TODO: write code...}
- # test case
- snippet testcase
- class \${1:ExampleCase}(unittest.TestCase):
-
- def test_\${2:description}(self):
- \${3:# TODO: write code...}
- snippet fut
- from __future__ import \${1}
- #getopt
- snippet getopt
- try:
- # Short option syntax: "hv:"
- # Long option syntax: "help" or "verbose="
- opts, args = getopt.getopt(sys.argv[1:], "\${1:short_options}", [\${2:long_options}])
-
- except getopt.GetoptError, err:
- # Print debug info
- print str(err)
- \${3:error_action}
- for option, argument in opts:
- if option in ("-h", "--help"):
- \${4}
- elif option in ("-v", "--verbose"):
- verbose = argument
- `}),ace.define("ace/snippets/python",["require","exports","module","ace/snippets/python.snippets"],function(n,t,e){t.snippetText=n("./python.snippets"),t.scope="python"}),function(){ace.require(["ace/snippets/python"],function(n){p&&(p.exports=n)})}()})(r);var s=r.exports;const d=c(s),f=$({__proto__:null,default:d},[s]);export{f as p};
- //# sourceMappingURL=python-bde75505.js.map
|