Show More
@@ -161,7 +161,8 b' def urlencodenested(params):' | |||||
161 | def process(prefix, obj): |
|
161 | def process(prefix, obj): | |
162 | if isinstance(obj, bool): |
|
162 | if isinstance(obj, bool): | |
163 | obj = {True: b'true', False: b'false'}[obj] # Python -> PHP form |
|
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 | if items is None: |
|
166 | if items is None: | |
166 | flatparams[prefix] = obj |
|
167 | flatparams[prefix] = obj | |
167 | else: |
|
168 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now