On 11 February 2013 15:07, Michael Hanselmann <[email protected]> wrote:
> 2013/2/11 Bernardo Dal Seno <[email protected]>:
>> On 6 February 2013 14:38, Michael Hanselmann <[email protected]> wrote:
>>> This is no longer needed now that instance/node objects in QA have
>>> attributes. Use a helper function instead to retrieve an entity's
>>> identifying attribute.
>>> ---
>>>  qa/qa_utils.py | 15 ++++++---------
>>>  1 file changed, 6 insertions(+), 9 deletions(-)
>>
>> The _GetName() idea seems rather Python-hackish (a properly typed
>> language wouldn't allow that), so I'd prefer it to go away entirely.
>> But since it's not introduced by this patch, then LGTM.
>
> Thanks for the LGTM. As for _GetName: I know a typed language wouldn't
> allow it. Do you have an idea how to do it differently (in Python)?

Yes: If a function only needs a name (e.g., AssertCommand), pass only
the name to it, not the encapsulating object.

Bernardo

Reply via email to