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

Output pdf dicts in deterministic order #6427

Merged
merged 2 commits into from
May 16, 2016

Conversation

jkseppan
Copy link
Member

For #6317 (but not a complete solution for that)

@tacaswell
Copy link
Member

Should we merge this as is or do you intend to add more commits to this?

@tacaswell tacaswell added this to the 2.1 (next point release) milestone May 16, 2016
r.extend([Name(key).pdfRepr() + b" " + pdfRepr(val)
for key, val in six.iteritems(obj)])
r.extend([Name(key).pdfRepr() + b" " + pdfRepr(obj[key])
for key in sorted(six.iterkeys(obj))])
Copy link
Member

Choose a reason for hiding this comment

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

The iterkeys seems unnecessary if you're going to sort it anyway; sorted(obj) should work just fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, that makes sense.

@jkseppan
Copy link
Member Author

@tacaswell I think it's probably better to merge sooner, it's going to be some work to implement the rest and this could make it easier for someone else to get started.

@tacaswell tacaswell merged commit 0dff252 into matplotlib:master May 16, 2016
@jkseppan jkseppan deleted the pdf-dict-order branch August 25, 2016 17:19
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.

None yet

4 participants