converting a nested try/except statement into try/except/else

Slawomir Nowaczyk slawomir.nowaczyk.847 at student.lu.se
Fri Aug 11 06:48:31 EDT 2006


On Thu, 10 Aug 2006 16:42:47 -0700
Simon Forman <rogue_pedro at yahoo.com> wrote:

#> 6.) There's a single return statement.
#> 
#> I forget now where I picked this up, but it's served me well for
#> many years: Procedures, functions, methods, etc... should have one
#> exit point. Something about having fewer "code paths" to test or
#> something.

Number of return statements has absolutely *nothing* to do with number
of code paths to test.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( Slawomir.Nowaczyk at cs.lth.se )

Only drug dealers and software companies call their customers 'users.'




More information about the Python-list mailing list