Pylint false positives
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):
> 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?
Because of course you replace inner classes and closures with top-level
classes and methods of top-level classes.
And of course, I would prefer not to create a class for a singleton
def __init__(self, some, arg):
c = self
self.d = object:
Unfortunately, there is no such syntax in Python.