On Mon, Sep 29, 2014 at 3:35 AM, Henrik Grubbström (Lysator) @ Pike
(-) developers forum <10...@lyskom.lysator.liu.se> wrote:
>>Program.all_inherits has a FIXME asking for docs. But its definition
>>is a little odd: it returns a list of the given program's inherits,
>>and everything they inherit - but not recursively.
>
> Not quite... Take a closer look at the loop -- It isn't a foreach()...
>
>>I could document it as such, but it strikes me that this should be
>>recursive, similar to inherit_tree but returning a flat array. Example
>>implementation in branch rosuav/pgm_all_inherits - what do you think?
>
> No need for a new implementation; the current already does it.

Oohhhhh...... right. I looked at it and misread it as a
manually-implemented foreach. Okay. In that case, I'll document it
as-is, but also add an explanatory comment for the benefit of the next
person.

ChrisA

Reply via email to