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

Method __next

Lib/re/_parser.py:240–255  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

238 self.next = None
239 self.__next()
240 def __next(self):
241 index = self.index
242 try:
243 char = self.decoded_string[index]
244 except IndexError:
245 self.next = None
246 return
247 if char == "\\":
248 index += 1
249 try:
250 char += self.decoded_string[index]
251 except IndexError:
252 raise error("bad escape (end of pattern)",
253 self.string, len(self.string) - 1) from None
254 self.index = index + 1
255 self.next = char
256 def match(self, char):
257 if char == self.next:
258 self.__next()

Callers 6

__init__Method · 0.95
matchMethod · 0.95
getMethod · 0.95
getwhileMethod · 0.95
getuntilMethod · 0.95
seekMethod · 0.95

Calls 1

errorClass · 0.50

Tested by

no test coverage detected