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

join function for iterutils #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fivetentaylor
Copy link

So I'm trying again with my other favorite iterator function. I've googled this time (somewhat) to make sure there's not an existing one out there (or right in itertools!)

The docstring describes it pretty well, let me know what you think!

Thanks,
Taylor

@mahmoud
Copy link
Owner

mahmoud commented Aug 12, 2015

FYI I've been thinking on and off about this for a while. You're definitely not the only one who've needed this before. A couple people I polled (and I) have even used in-memory sqlite tables for this basic functionality. So I'm 👍, though I'm considering the implementation, API, and name. Just thought I'd let you know it's still on my mind. Will try to have a solid plan in the next week or so.

@fivetentaylor
Copy link
Author

Very cool! I look forward to your decision, and definitely open to improvements on api/implementation. I'll think on it some more as well.

@kurtbrose
Copy link
Contributor

This is very interesting. One thing I'd be curious about: have you encountered any practical use cases? I can see how it might be a useful building block, but it is hard to think up a use case from scratch.

This seems pretty similar to the "zip" function. Maybe it could be called zipby() or zipon() instead of join()?

I think join() might be easy to confuse with a concurrency primitive (e.g. Thread.join() https://docs.python.org/2/library/threading.html#threading.Thread.join).

@mahmoud
Copy link
Owner

mahmoud commented Sep 17, 2015

Certainly thinking about it as a zip "on" a certain key function helps me think about it. If I had to guess, I think that'd be true of most Pythonists. I'd still definitely include the outer join comparison in documentation in the final product.

@fivetentaylor
Copy link
Author

I'm definitely open to changing the name. In pandas they have concat and merge as well as join. I think merge might be a reasonable choice.

@kurtbrose
Copy link
Contributor

Pandas is an interesting comparison. Everyone says good things about that
library.
I am becoming more and more convinced this will be a handy function :-)

On Fri, Sep 18, 2015 at 9:28 AM, Taylor Sather notifications@github.com
wrote:

I'm definitely open to changing the name. In pandas they have concat and
merge as well as join. I think merge might be a reasonable choice.


Reply to this email directly or view it on GitHub
#43 (comment).

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

3 participants