In static languages – it makes since to put the class variable at the top of the Class. However, since Python is dynamic, it can’t know about the functions until it processes them. class AwsProcessor: service_dict = {‘s3’: process_s3, ‘ebs’: process_ebs} def __init__(self, processing_service): self.service = processing_service def process_ebs(self): pass def process_s3(self): pass This gives error File “c:\aws-scripts\class AwsProcessor.py”, line […]
