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

Method __init__

Lib/email/_parseaddr.py:225–244  ·  view source on GitHub ↗

Initialize a new instance. 'field' is an unparsed address header field, containing one or more addresses.

(self, field)

Source from the content-addressed store, hash-verified

223 """
224
225 def __init__(self, field):
226 """Initialize a new instance.
227
228 'field' is an unparsed address header field, containing
229 one or more addresses.
230 """
231 self.specials = '()<>@,:;.\"[]'
232 self.pos = 0
233 self.LWS = ' \t'
234 self.CR = '\r\n'
235 self.FWS = self.LWS + self.CR
236 self.atomends = self.specials + self.LWS + self.CR
237 # Note that RFC 2822 section 4.1 introduced '.' as obs-phrase to handle
238 # existing practice (periods in display names), even though it was not
239 # allowed in RFC 822. RFC 5322 section 4.1 (which obsoletes RFC 2822)
240 # continues this requirement. We must recognize obsolete syntax, so
241 # allow dots in phrases.
242 self.phraseends = self.atomends.replace('.', '')
243 self.field = field
244 self.commentlist = []
245
246 def gotonext(self):
247 """Skip white space and extract comments."""

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected