MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _parseparam

Function _parseparam

tools/python-3.11.9-amd64/Lib/email/message.py:73–90  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

71 return param
72
73def _parseparam(s):
74 # RDM This might be a Header, so for now stringify it.
75 s = ';' + str(s)
76 plist = []
77 while s[:1] == ';':
78 s = s[1:]
79 end = s.find(';')
80 while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2:
81 end = s.find(';', end + 1)
82 if end < 0:
83 end = len(s)
84 f = s[:end]
85 if '=' in f:
86 i = f.index('=')
87 f = f[:i].strip().lower() + '=' + f[i+1:].strip()
88 plist.append(f.strip())
89 s = s[end:]
90 return plist
91
92
93def _unquotevalue(value):

Callers 1

_get_params_preserveMethod · 0.70

Calls 7

strFunction · 0.85
stripMethod · 0.80
findMethod · 0.45
countMethod · 0.45
indexMethod · 0.45
lowerMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected