MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / __init__

Method __init__

21-async/mojifinder/bottle.py:3459–3465  ·  view source on GitHub ↗
(self, source, syntax=None, encoding='utf8')

Source from the content-addressed store, hash-verified

3457 default_syntax = '<% %> % {{ }}'
3458
3459 def __init__(self, source, syntax=None, encoding='utf8'):
3460 self.source, self.encoding = touni(source, encoding), encoding
3461 self.set_syntax(syntax or self.default_syntax)
3462 self.code_buffer, self.text_buffer = [], []
3463 self.lineno, self.offset = 1, 0
3464 self.indent, self.indent_mod = 0, 0
3465 self.paren_depth = 0
3466
3467 def get_syntax(self):
3468 ''' Tokens as a space separated string (default: <% %> % {{ }}) '''

Callers

nothing calls this directly

Calls 2

set_syntaxMethod · 0.95
touniFunction · 0.85

Tested by

no test coverage detected