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

Method display_name

Lib/email/_header_value_parser.py:579–595  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

577
578 @property
579 def display_name(self):
580 res = TokenList(self)
581 if len(res) == 0:
582 return res.value
583 if res[0].token_type == 'cfws':
584 res.pop(0)
585 else:
586 if (isinstance(res[0], TokenList) and
587 res[0][0].token_type == 'cfws'):
588 res[0] = TokenList(res[0][1:])
589 if res[-1].token_type == 'cfws':
590 res.pop()
591 else:
592 if (isinstance(res[-1], TokenList) and
593 res[-1][-1].token_type == 'cfws'):
594 res[-1] = TokenList(res[-1][:-1])
595 return res.value
596
597 @property
598 def value(self):

Callers

nothing calls this directly

Calls 2

TokenListClass · 0.85
popMethod · 0.45

Tested by

no test coverage detected