Files
codeql/python/ql/src/Functions/IncorrectRaiseInSpecialMethod2.py
2018-11-19 15:10:42 +00:00

16 lines
337 B
Python

#Abstract base class, but don't declare it.
class ImplicitAbstractClass(object):
def __add__(self, other):
raise NotImplementedError()
#Make abstractness explicit.
class ExplicitAbstractClass:
__metaclass__ = ABCMeta
@abstractmethod
def __add__(self, other):
raise NotImplementedError()