Skip to content

Conversation

mike-perdide
Copy link

In order to be able to compare for instance None with a Commit, I'm suggesting that we check that 'other' has the attribute binsha before comparing. (also, see issue #15).

Thanks.

@Byron
Copy link
Member

Byron commented May 19, 2011

Hi Mike,

I specifically favored performance when implementing this, hence there are no extra compatibility checks, but the question is where this tad of performance will make an actual difference. People who want performance would save the method call and just do the lhs.binsha == rhs.binsha themselves.

A little bit of convenience is probably not a bad idea in this case, and I merged your request.

Thanks,
Sebastian

Byron added a commit that referenced this pull request May 19, 2011
improved comparison between Object instances to check for compatibility of the other side first. Previously, and exception would be thrown.
This adds convenience in an area which probably is not performance critical.
@Byron Byron merged commit 35bceb1 into gitpython-developers:master May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy