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

Method __str__

Lib/email/headerregistry.py:135–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

133 self.display_name, self.addresses)
134
135 def __str__(self):
136 if self.display_name is None and len(self.addresses)==1:
137 return str(self.addresses[0])
138 disp = self.display_name
139 if disp is not None and not parser.SPECIALS.isdisjoint(disp):
140 disp = parser.quote_string(disp)
141 adrstr = ", ".join(str(x) for x in self.addresses)
142 adrstr = ' ' + adrstr if adrstr else adrstr
143 return "{}:{};".format(disp, adrstr)
144
145 def __eq__(self, other):
146 if not isinstance(other, Group):

Callers

nothing calls this directly

Calls 4

strFunction · 0.85
isdisjointMethod · 0.45
joinMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected