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

Class QuotedString

Lib/email/_header_value_parser.py:241–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241class QuotedString(TokenList):
242
243 token_type = 'quoted-string'
244
245 @property
246 def content(self):
247 for x in self:
248 if x.token_type == 'bare-quoted-string':
249 return x.value
250
251 @property
252 def quoted_value(self):
253 res = []
254 for x in self:
255 if x.token_type == 'bare-quoted-string':
256 res.append(str(x))
257 else:
258 res.append(x.value)
259 return ''.join(res)
260
261 @property
262 def stripped_value(self):
263 for token in self:
264 if token.token_type == 'bare-quoted-string':
265 return token.value
266
267
268class BareQuotedString(QuotedString):

Callers 1

get_quoted_stringFunction · 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…