osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pylint false positives


On Wed, Aug 22, 2018 at 2:38 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Gregory Ewing <greg.ewing at canterbury.ac.nz>:
>
>> Marko Rauhamaa wrote:
>>> Lexically, there is special access:
>>>
>>>    class C:
>>>        def __init__(self, some, arg):
>>>            c = self
>>>            class D:
>>>                def method(self):
>>>                    access(c)
>>>                    access(some)
>>>                    access(arg)
>>
>> [...]
>>
>> you can do that without creating a new class every time you want an
>> instance. You just have to be *slightly* more explicit about the link
>> between the inner and outer instances.
>
> By "*slightly* more explicit," do you mean more syntactic clutter?
>

No, he actually means "explicit" in the normal English sense. You're
trying to use it in the python-ideas sense of "code that I like", and
since you don't like it, you want to call it "implicit" instead, but
it obviously isn't that, so you call it "syntactic clutter".

But this is actually a case of explicit vs implicit.

ChrisA