Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

add python 3 support #80

Merged
merged 2 commits into from
Jun 11, 2014
Merged

add python 3 support #80

merged 2 commits into from
Jun 11, 2014

Conversation

gcd0318
Copy link

@gcd0318 gcd0318 commented Jun 11, 2014

README is updated to python 3

@gcd0318 gcd0318 mentioned this pull request Jun 11, 2014
@gcd0318
Copy link
Author

gcd0318 commented Jun 11, 2014

#72 should be closed as this request is for python3 branch

@heatonjb heatonjb closed this Jun 11, 2014
@heatonjb heatonjb reopened this Jun 11, 2014
heatonjb added a commit that referenced this pull request Jun 11, 2014
@heatonjb heatonjb merged commit 1662a3f into facebookarchive:python3 Jun 11, 2014
@@ -76,7 +76,7 @@ def _build_parameters(self, args, kwargs):
except IndexError:
raise InstagramClientError("Too many arguments supplied")

for key, value in kwargs.iteritems():
for key, value in list(kwargs.items()):

Choose a reason for hiding this comment

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

While this still functions correctly, there isn't a need to try and turn this into a list:

>>> x = {'hello': 'world', 'testing': 'something'}
>>> for k,v in x.items():
...     print(k, v)
...
hello world
testing something
>>> for k,v in list(x.items()):
...     print(k,v)
...
hello world
testing something

@gcd0318
Copy link
Author

gcd0318 commented Jun 11, 2014

@troygrosfield true. try ... except could make all python codes to support both 2 and 3. I have thought of this way but .... I'm bit of lazy, and I have no python2 installed so that I cannot test for both 2 and 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants