-
Notifications
You must be signed in to change notification settings - Fork 51
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
ENH: add by_key #26
ENH: add by_key #26
Conversation
Promote `_transpose` to the public method `by_key`.
@efiring @mdboom @jenshnielsen I think this takes care of the cycler side of what we discussed. We probably should do a new cycler release very soon. |
Will this still work even with other operators that I plan to add soon? On Mon, Nov 30, 2015 at 5:27 PM, Thomas A Caswell notifications@github.com
|
It should be because under the hood it just does Doing this costs you all of your operator logic, but it works. |
yup, I think you are right. For some reason, I had a thought over the vacation that this wouldn't work, but I can't for the life of me remember why I thought that... |
@@ -371,6 +375,9 @@ def _transpose(self): | |||
out[k].append(d[k]) | |||
return out | |||
|
|||
# for back compatibility | |||
_transpose = by_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this, since it was private to begin with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was 50/50 on this. I was thinking of being semi-evil and using the private _transpose
in mpl so that it will work with current tagged version of cycler so we don't have to do a full release cycle on cycler
before implementing the key introspection on mpl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah -- that seems like more than a good enough reason.
This should probably have a test. Other than that, 👍 from me. |
Used internally for slicing so was implicitly covered.
bump this should be merged. |
This is the first Cycler feature release in some years. New features include: * Added `Cycler.by_key`, which produces values by key (matplotlib#26) * Added `Cycler.__contains__`, which adds support for `in` checks (matplotlib#34) * Wheels now includes the LICENSE file (matplotlib#48) * The sdist now includes the LICENSE (matplotlib#58) and tests (matplotlib#32) * Cycler no longer supports Python 2. Supported versions of Python are 3.6 and above.
This is the first Cycler feature release in some years. New features include: * Added `Cycler.by_key`, which produces values by key (matplotlib#26) * Added `Cycler.__contains__`, which adds support for `in` checks (matplotlib#34) * Wheels now includes the LICENSE file (matplotlib#48) * The sdist now includes the LICENSE (matplotlib#58) and tests (matplotlib#32) * Cycler no longer supports Python 2. Supported versions of Python are 3.6 and above.
Promote
_transpose
to the public methodby_key
.