-
Notifications
You must be signed in to change notification settings - Fork 270
Improvements to "compose" #398
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
Conversation
|
I am getting a test failure on python 3.3. Not sure how to resolve this: |
|
@ariebovenberg, thanks for following through and taking this on! I'll make time to give this a proper review soon. Regarding the failure in Python 3.3, my guess is it's from We should probably drop support for Python 2.6 and 3.3 anyway (heh, it's a little funny/embarrassing that we still test and support these versions). I recall these versions (and even 3.4) caused some difficulty for me in the past, which is probably the main reason this work hasn't been done yet. I think inspection has stabilized for Python 3.5-3.7. |
|
@eriknw, removing Dropping support for python 2.6 and 3.3 makes sense though, as they are both officially EOL. |
Avoid using .index() in partition_all
Signed-off-by: Kale Franz <kfranz@continuum.io>
fix #404 python3.7 generator expression fix
|
Hey, I've been afk for a few weeks. At a glance, this PR looks pretty good. I have a lot to catch up on, but I'm looking forward to giving this a more detailed review. |
These were deleted from the pytoolz GitHub account.
Fix DeprecationWarning in Python 3.7
fix memory leak with objects contained in the exception / traceback.
fix memory leak from exceptions
Fix a link and a formatting in a note on `map` and `filter`.
Update streaming-analytics.rst
DOC/BUG: fix import so in memory split-apply-combine example runs
Fix wrong docstring for unzip()
Add hint for groupby to documentation
Faster itertoolz.update_in
Faster join
Add `apply`
This involved some refactoring of the tests for compose(), so that we can programmatically ensure that compose() and pipeline() have equivalent tests.
This unfortunately removes ability of parametrized tests to fail independently, but is necessary so that CI tests will pass
Add pipeline() function
Added peekn
Faster dissoc
…rg/toolz into ariebovenberg-compose-improvements
|
This is in! I took care of a merge conflict. Thanks @ariebovenberg! |
|
Quick question: why did you define |
|
@eriknw it's so that you can use def int_output(func):
return compose(func, int)
@int_output
def mult(a, b):
return a * bIt's fine to remove |
|
It's probably best to either remove |
Implements #397
some remarks:
__hash__, under the assumption thatComposeobjects are not intended to be mutated. Perhaps it is best to make this explicit, or to remove__hash__.compose. Perhaps it is best to split the test function up, considering its length.__signature__for python3 only. Perhaps an elegant way of supporting python 2 is to importSignaturefrom thefuncsigsmodule, if it is installed. This wayfuncsigsis an optional dependency, keepingtoolzitself lightweight and dependency-less.edit: formatting