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

Method addr_spec

Lib/email/headerregistry.py:67–78  ·  view source on GitHub ↗

The addr_spec (username@domain) portion of the address, quoted according to RFC 5322 rules, but with no Content Transfer Encoding.

(self)

Source from the content-addressed store, hash-verified

65
66 @property
67 def addr_spec(self):
68 """The addr_spec (username@domain) portion of the address, quoted
69 according to RFC 5322 rules, but with no Content Transfer Encoding.
70 """
71 lp = self.username
72 if not parser.DOT_ATOM_ENDS.isdisjoint(lp):
73 lp = parser.quote_string(lp)
74 if self.domain:
75 return lp + '@' + self.domain
76 if not lp:
77 return '<>'
78 return lp
79
80 def __repr__(self):
81 return "{}(display_name={!r}, username={!r}, domain={!r})".format(

Callers

nothing calls this directly

Calls 1

isdisjointMethod · 0.45

Tested by

no test coverage detected