Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support doseq for urlencode #14

Merged
merged 1 commit into from
Mar 5, 2015
Merged

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Mar 4, 2015

Resolves #13

I ran into some flake8 errors, which are the other changes here.

@@ -30,10 +30,16 @@ def _pairs(obj):
return obj.iteritems() if isinstance(obj, dict) else obj


def urlencode(query, *args, **kwargs):
def urlencode(query, doseq=0):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a 0 instead of False? May be a docstring for doseq as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just copying what the stdlib does, not sure why it's done that way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically you can reassign True in 2.x, but not 0. So there IS that, hah

@prat0318
Copy link

prat0318 commented Mar 4, 2015

lgtm.

import urllib
import urlparse

from yelp_uri import urllib_utf8


_suites = ['unicode']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, leftovers from testify days, can delete

@bukzor
Copy link
Contributor

bukzor commented Mar 5, 2015

testing: 🐵

@bukzor bukzor merged commit 64c5584 into Yelp:master Mar 5, 2015
@dnephin dnephin deleted the urlencode_lists branch March 5, 2015 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

urlencode can behave differently from urllib.urlencode
5 participants