[PATCH 6/6] Disable pylint errors for namedtuple._make

David Shea dshea at redhat.com
Mon Sep 9 13:35:58 UTC 2013


On 09/09/2013 04:06 AM, Vratislav Podzimek wrote:
> On Sun, 2013-09-08 at 12:33 -0400, David Shea wrote:
>> Pylint does not handle the _make, _asdict, _replace and _fields
>> attributes of namedtuple objects, and it looks like they have no
>> interest in doing so. See http://www.logilab.org/ticket/33617
> That's because those are hardly ever needed. We should use
> NamedTuple(iterable) instead of NamedTuple._make(iterable). Please do
> this change instead of disabling pylint on those places.
>
> Otherwise these all look good to me. Thanks for removing a lot of mess
> I've introduced with my recent patches.
>
I'll change this locally. In this case, I think that "obj = 
TupleClass(*row)" looks better than "obj = TupleClass._make(row)", but 
in general I don't like the idea of changing our code just because 
pylint doesn't understand a particular feature of python.


More information about the anaconda-patches mailing list