Pikling error: function MyClass.metho not the same object as __module__.MyClass.metho
问题 I'm trying to implement metaclass/decorator facilities to allow easy-ish parallelization of code. I'm using Python's multiprocessing. Say I have: class Worker(metaclass=Parallelizable): def __init__(self): super().__init__() # annotate some method for parallele computation @ParalleleMethod def long_calculation(self, data): # do stuff return ans class ParalleleMethod: def __init__(self, func): self.func = func def __call__(self, data): # as a prototype of the idea I want to get to pool.starmap