30 lines
780 B
Python
30 lines
780 B
Python
class StackOverflowCopypaste:
|
|
__doc__ = None
|
|
__author__ = None
|
|
__license__ = 'CC BY-SA 3.0'
|
|
|
|
def __str__(self): return str(self.__call__)
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
'''Calls the copy-pasted code'''
|
|
raise NotImplementedError
|
|
|
|
|
|
class stackoverflow_a_21563930(StackOverflowCopypaste):
|
|
__doc__ = 'https://stackoverflow.com/a/21563930'
|
|
__author__ = 'piRSquared'
|
|
|
|
def __call__(self, module):
|
|
module_dict = module.__dict__
|
|
return [
|
|
definedClass for definedClass in module_dict.values()
|
|
if (
|
|
isinstance(definedClass, type)
|
|
and
|
|
definedClass.__module__ == module.__name__
|
|
)
|
|
]
|
|
|
|
|
|
classesInModule = stackoverflow_a_21563930()
|