MCPcopy Index your code
hub / github.com/RustPython/RustPython / QuotedString

Class QuotedString

Lib/email/_header_value_parser.py:234–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

get_quoted_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected