3 ms·
I don't think those comments are very helpful. I think a function-level comment would be much clearer. # Outputs 'Fizz' when +arg+ is divisible by 3, 'Buzz'
by Confusion 16y ago
I don't think those comments are very helpful. I think a function-level comment would be much clearer.
# Outputs 'Fizz' when +arg+ is divisible by 3, 'Buzz' when
# it is divisible by 5 and 'FizzBuzz' when it is divisible
# by both 3 and 5.
- 16s 16y agoThat's a matter of opinion. I always do this. Now there is no question what each conditional is intended to do. So if I make a mistake, you can clearly see from the conditional comment what I meant to do.