MCPcopy Create free account
hub / github.com/RustPython/RustPython / display_name

Method display_name

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

Source from the content-addressed store, hash-verified

570
571 @property
572 def display_name(self):
573 res = TokenList(self)
574 if len(res) == 0:
575 return res.value
576 if res[0].token_type == 'cfws':
577 res.pop(0)
578 else:
579 if (isinstance(res[0], TokenList) and
580 res[0][0].token_type == 'cfws'):
581 res[0] = TokenList(res[0][1:])
582 if res[-1].token_type == 'cfws':
583 res.pop()
584 else:
585 if (isinstance(res[-1], TokenList) and
586 res[-1][-1].token_type == 'cfws'):
587 res[-1] = TokenList(res[-1][:-1])
588 return res.value
589
590 @property
591 def value(self):

Callers

nothing calls this directly

Calls 4

TokenListClass · 0.85
lenFunction · 0.85
isinstanceFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected