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

Class AngleAddr

Lib/email/_header_value_parser.py:429–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427
428
429class AngleAddr(TokenList):
430
431 token_type = 'angle-addr'
432
433 @property
434 def local_part(self):
435 for x in self:
436 if x.token_type == 'addr-spec':
437 return x.local_part
438
439 @property
440 def domain(self):
441 for x in self:
442 if x.token_type == 'addr-spec':
443 return x.domain
444
445 @property
446 def route(self):
447 for x in self:
448 if x.token_type == 'obs-route':
449 return x.domains
450
451 @property
452 def addr_spec(self):
453 for x in self:
454 if x.token_type == 'addr-spec':
455 if x.local_part:
456 return x.addr_spec
457 else:
458 return quote_string(x.local_part) + x.addr_spec
459 else:
460 return '<>'
461
462
463class ObsRoute(TokenList):

Callers 1

get_angle_addrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…