[merge] LazyFactory

Robert Collins robertc at robertcollins.net
Wed Aug 16 03:29:19 BST 2006


On Tue, 2006-08-15 at 13:59 +0200, Adeodato Simó wrote:
> * Robert Collins [Tue, 15 Aug 2006 14:16:17 +1000]:
> 
> > I think 'registry.is_first_entry(an_entry)' is much clearer than
> > 'bool(self._dict)'
> 
> Would you approve registry.is_empty() instead? Doesn't seem to me like
> the function needs the "an_entry" argument.

If its internal to the object, using 'if not len(self._dict)' would be
ok too - its much more clear than casting to bool.

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/20060816/fe04a12f/attachment.pgp 


More information about the bazaar mailing list