MCPcopy Create free account
hub / github.com/webpy/webpy / __init__

Method __init__

web/template.py:647–654  ·  view source on GitHub ↗
(self, stmt, block, begin_indent="")

Source from the content-addressed store, hash-verified

645
646class ForNode(BlockNode):
647 def __init__(self, stmt, block, begin_indent=""):
648 self.original_stmt = stmt
649 tok = PythonTokenizer(stmt)
650 tok.consume_till("in")
651 a = stmt[: tok.index] # for i in
652 b = stmt[tok.index : -1] # rest of for stmt excluding :
653 stmt = a + " loop.setup(" + b.strip() + "):"
654 BlockNode.__init__(self, stmt, block, begin_indent)
655
656 def __repr__(self):
657 return f"<block: {repr(self.original_stmt)}, {repr(self.suite)}>"

Callers

nothing calls this directly

Calls 3

consume_tillMethod · 0.95
PythonTokenizerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected