Skip to content

Conversation

WeatherGod
Copy link
Member

Issues discovered while working on the key rename PR.

cycler.py Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This isn't deep enough to protect against changing the key, but this depends on how #13 ends up being implemented

In [80]: dd = [{a: a} for a in range(3)]

In [81]: import copy

In [82]: dd2 = copy.copy(dd)

In [83]: dd[0][0] = 'foobare'

In [84]: dd2
Out[84]: [{0: 'foobare'}, {1: 1}, {2: 2}]

I think this needs to be

self._left = [dict(v) for v in left]

@WeatherGod
Copy link
Member Author

ok, I reworked it a bit, and even managed to get rid of the ugly _shallow_copy() function.

@tacaswell
Copy link
Member

Oh, that is nice. If I had thought of that originally the function cycler would not exist.

tacaswell added a commit that referenced this pull request Aug 22, 2015
@tacaswell tacaswell merged commit 68b4995 into matplotlib:master Aug 22, 2015
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.

2 participants