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

Update to new release #288

Merged
merged 3 commits into from
Nov 20, 2013
Merged

Update to new release #288

merged 3 commits into from
Nov 20, 2013

Conversation

carlosmn
Copy link
Member

Adjust to the changes in 0.20. This includes moving away from callback to iterations, letting us do better error reporting.

This wraps the previous functionality, though there are some iterator
changes we might still want to bring over.
@carlosmn
Copy link
Member Author

While doing this update, I noticed that pygit2 returns a tuple when asked for the references in a repo. It seems really odd to me to return a tuple rather than a list, as you don't know how many there are beforehand, and they're not sorted (and sorting wouldn't have any meaning you could put into a tuple anyway). Is there some deeper pythonic reason for this?

@jdavid jdavid merged commit 4c47eba into libgit2:master Nov 20, 2013
@jdavid
Copy link
Member

jdavid commented Nov 20, 2013

You're right, it would be more correct, pythonic, to return a list.

The Python criteria is, if it is a sequence of semantically the same kind of object, then it is a list. If it is a package of different kind of objects, like a record, then it is a tuple.

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.

3 participants