[MERGE] Add __eq__ and __ne__ methods to Repository objects

Aaron Bentley aaron.bentley at utoronto.ca
Tue Aug 7 04:46:52 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Bennetts wrote:
> Martin Pool wrote:
> [...]
>> I think in this case explicit is better: I would rather have a method called eg
>>
>>   repo.isSameLocation(other)
>>
>> that gives some indication of what's being compared, and that makes it
>> clear this is not just an ==.  That's not a great name for it though.
> 
> Yeah, it's hard thinking of a good name.  The precise concept is really "is
> stored at the same URL", which is a bit verbose to squeeze into a method name.
> I think isSameLocation (or a variation on the phrase "same location", e.g.
> at_same_location_as?) is about as good as we'll get :/

Funny, I just wrote a patch like this at the cottage.  My version was
called Repository.has_same_location.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGt+ss0F+nu1YWqI0RAm28AJ9ggnnVTTKDtlUK1hl0GDCEItPRyACeIxgp
McrKZ+Xt43rqjCRmrp+vVMg=
=5cXO
-----END PGP SIGNATURE-----



More information about the bazaar mailing list