Python style: exceptions vs. sys.exit()

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Mon Sep 29 12:27:22 EDT 2008


Lawrence D'Oliveiro a écrit :
> In message <gbgu3v$mie$1 at rumours.uwaterloo.ca>, Ross Ridge wrote:
> 
>> You need either use trial and error to find out, or look at the source.
> 
> So what's wrong with using the source as documentation? :)

Don't know... Ok, having higher-level documentation  (the big picture, 
and quick description of what and how for classes and functions) really 
helps. But when it comes to nitty-gritty details, source code is the 
best documentation ever, since it's always accurate and up to date.

FWIW, I'm often surprised by people asking questions about some 
implementation detail of some open-source library or framework that are 
very easily answered just looking at the source code. Reading the source 
is 1/ the best way to really know how something is implemented and 2/ 
usually very instructive.



More information about the Python-list mailing list