Show More
@@ -161,7 +161,8 b' def urlencodenested(params):' | |||
|
161 | 161 | def process(prefix, obj): |
|
162 | 162 | if isinstance(obj, bool): |
|
163 | 163 | obj = {True: b'true', False: b'false'}[obj] # Python -> PHP form |
|
164 | items = {list: enumerate, dict: lambda x: x.items()}.get(type(obj)) | |
|
164 | lister = lambda l: [(b'%d' % k, v) for k, v in enumerate(l)] | |
|
165 | items = {list: lister, dict: lambda x: x.items()}.get(type(obj)) | |
|
165 | 166 | if items is None: |
|
166 | 167 | flatparams[prefix] = obj |
|
167 | 168 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now