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

Method gotonext

Lib/email/_parseaddr.py:246–258  ·  view source on GitHub ↗

Skip white space and extract comments.

(self)

Source from the content-addressed store, hash-verified

244 self.commentlist = []
245
246 def gotonext(self):
247 """Skip white space and extract comments."""
248 wslist = []
249 while self.pos < len(self.field):
250 if self.field[self.pos] in self.LWS + '\n\r':
251 if self.field[self.pos] not in '\n\r':
252 wslist.append(self.field[self.pos])
253 self.pos += 1
254 elif self.field[self.pos] == '(':
255 self.commentlist.append(self.getcomment())
256 else:
257 break
258 return EMPTYSTRING.join(wslist)
259
260 def getaddrlist(self):
261 """Parse all addresses.

Callers 3

getaddressMethod · 0.95
getrouteaddrMethod · 0.95
getaddrspecMethod · 0.95

Calls 3

getcommentMethod · 0.95
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected