[Freeipa-devel] [PATCH 0128] ipalib/cli.py: pythonify Collector class

Martin Babinsky mbabinsk at redhat.com
Thu Jan 28 16:32:42 UTC 2016


On 01/28/2016 05:06 PM, Tomas Babej wrote:
>
>
> On 01/28/2016 04:44 PM, Martin Babinsky wrote:
>> On 01/28/2016 03:20 PM, Tomas Babej wrote:
>>>
>>>
>>> On 01/27/2016 03:58 PM, Martin Babinsky wrote:
>>>> On 01/18/2016 06:43 PM, Martin Babinsky wrote:
>>>>> A little patch that should make some future pylint errors disappear.
>>>>>
>>>>>
>>>>>
>>>> Attaching updated patch that does not promote direct molestation of
>>>> instance dictionaries.
>>>>
>>>>
>>>>
>>>
>>> Patch looks good, one thing I am concerened about though is that
>>> __todict__ now returns a direct reference to the internal, mutable dict,
>>> and no longer a (shallow) copy.
>>>
>>> Maybe we should use dict.copy() there?
>>>
>>> Tomas
>>>
>>
>> Ah I didn't realize that. Fixed in updated patch.
>>
>
> Nitpick: Sorry for being misleading - I did not mean to suggest invoking
> the method using the dict type directly. While being equivalent, the
>
> dict.copy(self.__options)
>
> it's less idiomatic than:
>
> self.__options.copy()
>
> Tomas
>

Ah sorry I forgot how to python again.

Attaching patch.

-- 
Martin^3 Babinsky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mbabinsk-0128.3-ipalib-cli.py-pythonify-Collector-class.patch
Type: text/x-patch
Size: 1806 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160128/8a98f886/attachment.bin>


More information about the Freeipa-devel mailing list