Larry Bates wrote:
I also have a personal dislike for early returns because I've found it
makes it harder insert execution trace logging into the code.
in a language that makes it trivial to wrap arbitrary callables in
tracing wrappers?
--
http://mail.python.org/mailman/listinfo/python-li
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
Sorry but I respectfully disagree that this is "abuse" of the __call__
method.
As long as we respectfully agree to disagree...
!-)
Anyway, I don't think we have enough background to seriously agree or
disagree on what would make
Larry Bates a écrit :
Bruno Desthuilliers wrote:
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more car
Bruno Desthuilliers wrote:
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more careful re-read of other p
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more careful re-read of other posts in the thread, it
migh
Marco Bizzarri a écrit :
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> 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_reg
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
and rewrite it as a regular loop for clarity.
Sometimes the simplest way is the easiest to read.
class
Marco Bizzarri wrote:
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> 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_regist
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> 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_registrati