Search code examples
naming-conventionsnaming

How to deal with several number in camel case?


I have a variable like model_1_5_7 and I need to rename it in camel case. I need it because earlier my models were functions in Python but now I need to make them as classes.


Solution

  • You could use a letter instead of the underscore, for instance p (for point), which would give model1p5p7. If the module numbers are dense you could also use a three-dimensional array named models and designate the individual models with three indices, for example models[1][5][7].