(s)
| 189 | Returns a dictionary of (name, value)-items from a URL query string. |
| 190 | """ |
| 191 | def _format(s): |
| 192 | if s == "" or s == "None": |
| 193 | return None |
| 194 | if s.lstrip("-").isdigit(): |
| 195 | return int(s) |
| 196 | try: return float(s) |
| 197 | except: |
| 198 | return s |
| 199 | if query: |
| 200 | query = query.lstrip("?").split("&") |
| 201 | query = ((kv.split("=") + [None])[:2] for kv in query) |
no outgoing calls
no test coverage detected
searching dependent graphs…