[RFC] allow fulltext to be more dynamic

Alexander Belchenko bialix at ukr.net
Fri Nov 24 17:34:28 GMT 2006


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

John Arbash Meinel пишет:
> Dmitry Vasiliev wrote:
>> John Arbash Meinel wrote:
> 
[skip]
>>> +        if method == 'line-delta' or fulltext_size < delta_size:
>>> +            return False
>>> +        return True
>> Again I'd prefer just
>> return not (method == 'line-delta' or fulltext_size < delta_size)
> 
> 
> What do people think of this? I don't think I prefer doing:
> 
>   return (complex boolean logic)

I'm also don't want this, especially with logical 'not'. It has worse
readability, IMO.


> If it is simple, then:
>   return (x == 1)
> 
> Seems okay. And actually with Henri's suggestion, rewriting it to be:
> 
> for count in xrange(self._max_chain_length):
>   ...
> else:
>   return False #Couldn't find a full text, so we must create a new one
> 
> # Create a delta if it will still be smaller than a fulltext
> return fulltext_size > delta_size
[skip]

Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFZy0kzYr338mxwCURAhZ3AJ9MiznMVYBEZAXmghZFYt7qC+kkKACfStaE
veBC9UWJuGmMNiWoRr2TD50=
=Kdal
-----END PGP SIGNATURE-----





More information about the bazaar mailing list