fibonacci series what Iam is missing ?
Dave Angel
d at davea.name
Mon Mar 23 20:09:13 EDT 2015
On 03/23/2015 07:49 PM, Chris Angelico wrote:
> On Tue, Mar 24, 2015 at 10:12 AM, Dave Angel <davea at davea.name> wrote:
>> On the other hand, my loop makes some non-obvious assumptions, like that
>> append is always the right place to put a new value.
>
> Yes, I had to stop and think about that one a bit. And that strongly
> suggests (to me, at least!) that it's comment-worthy :)
>
It's funny. I thought of commenting it, but wanted to wait till I
checked whether I could call fib+fib in the opposite order. By the time
i realized they both worked fine i forgot to enter the comment. (Note;
missing comment is usually not as bad as inaccurate comment)
Repeat to self: comment first, then write test, then write the code.
Reply to self: Maybe next time.
--
DaveA
More information about the Python-list
mailing list