code style and readability [was: Re: Checking the boolean value of a collection]

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sat Sep 13 11:05:42 EDT 2008


Marco Bizzarri a écrit :
> On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <fredrik at pythonware.com> wrote:
>> Marco Bizzarri wrote:
>>
>>> class FolderInUse:
>>>
>>>    def true_for(self, archivefolder):
>>>        return any([instance.forbid_to_close(archivefolder) for instance in
>>>            self.core.active_outgoing_registration_instances()])
>>>
>>> Is this any better? The true_for name does not satisfy me a lot...
>> well, "true_for" is indeed pretty inscrutable, but I'm not sure that would
>> be the first thing I'd complain about in that verbose mess...
> 
> "verbose mess".
> 
> It is always frustrating when you do what you think is your best and
> you read that.

The effbot is sometimes a bit abrupt in his formulations, for sure !-)



More information about the Python-list mailing list