W
Wanderer
Pylint W0221 gives the warning
Argument number differs from overridden method.
Why is this a problem? I'm overriding the method to add additional
functionality.
This
def GetRays(self, angle, pt, lmbda = 0.6):
"""
"""
angle, x, y, Rays, Power = self.ARefract(angle, pt[0], pt[1],
lmbda)
pt1 = (x, y)
return Rays, Power, angle, pt1
def ARefract(self, angle, x, y, lmbda = 0.6):
"""
"""
Nt = self.Mat.NtGet(lmbda)
self.NtSet(Nt)
angle, x, y, Rays, Power = self.Refract(angle, x, y)
return angle, x, y, Rays, Power
Over rides this
def GetRays(self, angle, pt):
"""
"""
angle, x, y, Rays, Power = self.Refract(angle, pt[0], pt[1])
pt1 = (x, y)
return Rays, Power, angle, pt1
Thanks
Argument number differs from overridden method.
Why is this a problem? I'm overriding the method to add additional
functionality.
This
def GetRays(self, angle, pt, lmbda = 0.6):
"""
"""
angle, x, y, Rays, Power = self.ARefract(angle, pt[0], pt[1],
lmbda)
pt1 = (x, y)
return Rays, Power, angle, pt1
def ARefract(self, angle, x, y, lmbda = 0.6):
"""
"""
Nt = self.Mat.NtGet(lmbda)
self.NtSet(Nt)
angle, x, y, Rays, Power = self.Refract(angle, x, y)
return angle, x, y, Rays, Power
Over rides this
def GetRays(self, angle, pt):
"""
"""
angle, x, y, Rays, Power = self.Refract(angle, pt[0], pt[1])
pt1 = (x, y)
return Rays, Power, angle, pt1
Thanks