[MERGE] Use slots consistently in InventoryEntry hierarchy -- update

Robert Collins robertc at robertcollins.net
Sun Jun 11 11:38:18 BST 2006


On Wed, 2006-06-07 at 21:03 +0200, Jan Hudec wrote:
> 
> > There should be no attribute on class or instance for e.g.
> > symlink_target except on InventoryLink.
> 
> That's what the previous version of the patch did. And I got complaint
> that
> it shouldn't be checking for the kind. So I tried this, because
> benchmarking says it's faster than checking with hasattr or try/catch.

The right approach is to only *attempt* to access those attributes when
they are guaranteed to exist.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060611/f1c9de79/attachment.pgp 


More information about the bazaar mailing list