Skip to content
Advertisement

Tag: naming-conventions

EKS/AKS cluster name convention

I am writing a script that receives a Kubernetes context name as an input and outputs the different elements of the cluster -> Output: This will support only the three main providers (GKE, EKS, AKS). My question is: What are the different elements of EKS and AKS context names? Answer You need to differentiate between the correct name of the

Why do python module names have some uppercase letters but are always imported in lowercase?

Whenever I see references to modules like SciPy and NumPy the first letter of each part is capitalized. However they must be imported with all lowercase letters. Why is there this difference? Answer The difference is basically in branding. As per the style guide: https://www.python.org/dev/peps/pep-0008/#package-and-module-names module names should be short and all lower cased. One reason for that is that

Python abstract classes – how to discourage instantiation?

I come from a C# background where the language has some built in “protect the developer” features. I understand that Python takes the “we’re all adults here” approach and puts responsibility on the developer to code thoughtfully and carefully. That said, Python suggests conventions like a leading underscore for private instance variables. My question is, is there a particular convention

What is the naming convention for Python class references

What is the naming convention for a variable referencing a class in Python? Here is another example that resembles my situation: I would prefer ReferenceToClass, that everybody new to the code knows it’s a class and not an instance. But as poplitea wrote, literature reference would be great. Answer On module level the second: ReferenceToClass = MyClass As a function

Advertisement