Closed leifp closed 9 years ago
This is a great addition. One or two comments about style but with a few tests I'd be happy to merge this in
OK, I'll make that change and write a couple tests. You may see the author change, since I was mistakenly using my work email.
OK, PR updated. One change I made to support my use case is to handle arrays of different lengths. You should decide whether this behavior will break existing usage. The previous behavior was
I changed the behavior of case 1 to return None; case 2 remains the same.
Also, I have not tested with Python 3.
I think you're correct with the IndexError not making sense. I never really used that functionality so your additions make sense.
Thanks for the contributions and tests. I haven't tested this on Python 3 either. For now it's fine, if someone requests it, I'll look into the issues that might arise.
This PR is just for comments. Assuming you like the idea / interface / impl, I can add tests.