if - else

Jay O'Connor joconnor at cybermesa.com
Thu Nov 27 13:04:55 EST 2003


John J. Lee wrote:

>Duncan Booth <duncan at NOSPAMrcp.co.uk> writes:
>
>  
>
>>Jeff Wagner <JWagner at hotmail.com> wrote in
>>news:oanasvs703tipmup24qgc5toggte8uh67n at 4ax.com: 
>>    
>>
>[...]
>  
>
>>>        if SumOfNumbers = 10:
>>>            #If SumOfNumbers = 10, then set it's value to 1
>>>            SumOfNumbers = 1
>>>      
>>>
>[...]
>
>Classic example of a worse-than-useless comment: it just repeats the
>code (even experienced programmers frequently fall into this trap,
>though they're not usually quite so blatant about it ;-).
>

True, also someone's being careless with their code.

    if SumOfNumbers = 10:
        SumOfNumbers = 1

What happens with that? :)








More information about the Python-list mailing list