[Tutor] Multi-line statements with comments

alan.gauld@bt.com alan.gauld@bt.com
Mon, 31 Dec 2001 14:20:57 -0000


> I tend to want to write code that is well-commented
> and easy to read, with a minimum of abstraction.  

Thats a good aim, just be sure not to over comment it!
It used to be said that 40% comment was good but more 
recent studies suggest that for higher level languages 
like Python 10-20% is better.

Also don't forget to use doc strings to comment your 
functions/classes rather than traditional comments.
With good doc strings in place you shouldn't need too many comments


For
> now, another function seems a little to much, an
> unnecessary amount of logic that others may not pick
> up on.
> 
> It also may make my code harder to share, without some
> cut and paste for readability.
> 
> Once again, I appreciate all the responses, thanks
> very much.
> 
> ---
> Jim
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
>