pylint #8769 downgrads missing attribute errors to warnings if there is some modifications to __dict__ or __getattr__ [open]
Idea proposed to Vincent Legoll, since we know pylint/astng won't ever be able to read dynamic code such as : class struct(object): """Similar to a dictionary except that members may be accessed as s.member. Usage: s = struct(a=10, b=20, d={"cat":"dog"} ) print s.a + s.b """ def __init__(self, **args): self.__dict__.update(args) def __repr__(self): r = ["<"] for i in self.__dict__.keys(): r.append("%s=%s" % (i, getattr(self,i))) r.append(">\n") return " ".join(r) | |
priority | normal |
---|---|
type | bug |
done in | <not specified> |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |