MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / _parse_qsl

Function _parse_qsl

21-async/mojifinder/bottle.py:2586–2595  ·  view source on GitHub ↗
(qs)

Source from the content-addressed store, hash-verified

2584 pass
2585
2586def _parse_qsl(qs):
2587 r = []
2588 for pair in qs.split('&'):
2589 if not pair: continue
2590 nv = pair.split('=', 1)
2591 if len(nv) != 2: nv.append('')
2592 key = urlunquote(nv[0].replace('+', ' '))
2593 value = urlunquote(nv[1].replace('+', ' '))
2594 r.append((key, value))
2595 return r
2596
2597def _lscmp(a, b):
2598 ''' Compares two strings in a cryptographically safe way:

Callers 2

queryMethod · 0.85
POSTMethod · 0.85

Calls 2

appendMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected