MCPcopy Index your code
hub / github.com/python/cpython / __next__

Method __next__

Tools/clinic/libclinic/block_parser.py:125–144  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 return self
124
125 def __next__(self) -> Block:
126 while True:
127 if not self.input:
128 raise StopIteration
129
130 if self.dsl_name:
131 try:
132 return_value = self.parse_clinic_block(self.dsl_name)
133 except ClinicError as exc:
134 exc.filename = self.language.filename
135 exc.lineno = self.line_number
136 raise
137 self.dsl_name = None
138 self.first_block = False
139 return return_value
140 block = self.parse_verbatim_block()
141 if self.first_block and not block.input:
142 continue
143 self.first_block = False
144 return block
145
146
147 def is_start_line(self, line: str) -> str | None:

Callers

nothing calls this directly

Calls 2

parse_clinic_blockMethod · 0.95
parse_verbatim_blockMethod · 0.95

Tested by

no test coverage detected