I m developing in Python using PyDev in Eclipse, and some of my code generates errors in the code analysis tool. Specifically:
class Group(object):
def key(self, k):
class Subkey(object):
def __enter__(s):
self._settings.beginGroup(k)
return self
def __exit__(s, type, value, tb):
self._settings.endGroup()
return Subkey()
Gives me a "Method __enter__- group should have self as first parameter"
error, and a similar error for __exit__
. Is there a way to solve this without assigning self
to another variable and reusing the variable in the other method signatures?