Menu

#116 Completions for other.<TAB> in __eq__

open
nobody
None
5
2006-04-18
2006-04-18
Dobes V
No

If would be handy if the completions for the second
parameter of __eq__, __cmp__, __lt__, etc. would be
the same as for self.

e.g.:

class MyClass:
def __init__(self)
self.a = 1
self.b = 2

def __eq__(self, other):
return (isinstance(other, self.__class__ and
other.<TAB> # Now show me a and b!

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.