X Tutup
Skip to content

Output pdf dicts in deterministic order#6427

Merged
tacaswell merged 2 commits intomatplotlib:masterfrom
jkseppan:pdf-dict-order
May 16, 2016
Merged

Output pdf dicts in deterministic order#6427
tacaswell merged 2 commits intomatplotlib:masterfrom
jkseppan:pdf-dict-order

Conversation

@jkseppan
Copy link
Copy Markdown
Member

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

@tacaswell
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants

X Tutup