Open pylint-bot opened 10 years ago
Originally reported by: Łukasz Rogalski (BitBucket: rogalski, GitHub: @rogalski?)
In typical cases, explicit call to magic method should be considered as violation. Consider this example:
#!python class Comparable(object): def __cmp__(self, other): return some_integer cmp1 = Comparable() cmp2 = Comparable() print cmp1 == cmp2 # correct print cmp1 > cmp2 # correct print cmp1.__cmp__(cmp2) # violation
Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):
True, we should emit a warning for this case.
Originally reported by: Łukasz Rogalski (BitBucket: rogalski, GitHub: @rogalski?)
In typical cases, explicit call to magic method should be considered as violation. Consider this example: