[Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

Fred Drake fdrake at acm.org
Thu Jul 17 03:56:46 CEST 2008


On Jul 16, 2008, at 9:45 PM, Andrew Bennetts wrote:
> I am proposing that it should have exactly one meaning.  Callers  
> will be free to
> ignore the return value if they don't need it, and will see zero  
> difference in
> behaviour.


Sounds like adding a new method, catchException(...), that returns the  
exception it catches, would be a reasonable compromise.  I can't think  
of any reason that the method that catches-and-returns needs to be the  
existing API, which does something different.

OTOH, I really don't have a problem with doing a try/except/else  
myself if that's what I need.


   -Fred

-- 
Fred Drake   <fdrake at acm.org>






More information about the Python-Dev mailing list