PyFunctionDef should also have a hasOverloads() method for quacking like a duck.

This commit is contained in:
Robin Dunn
2016-08-05 21:17:15 -07:00
parent 97a5183ebf
commit 0a80536c8b

View File

@@ -1248,6 +1248,15 @@ class PyFunctionDef(BaseDef):
self.overloads = []
self.__dict__.update(kw)
def hasOverloads(self):
"""
Returns True if there are any overloads that are not ignored.
"""
return bool([x for x in self.overloads if not x.ignored])
#---------------------------------------------------------------------------
class PyClassDef(BaseDef):