An issue with large systems is managing the dependency graph, e.g. when a well-known public data structure change how does it impact the modules etc.?I am working on a very large Python codebase at work. Things are fine, because we are strict about code consistency, dependency management and having a single version of everything (no "DLL hell").
An issue with large systems is managing the dependency graph, e.g. when a well-known public data structure change how does it impact the modules etc.?I am working on a very large Python codebase at work. Things are fine, because we are strict about code consistency, dependency management and having a single version of everything (no "DLL hell").
There are private data in Python. They are denoted by convention by an underscore in front of variable name. Any linter can catch this.I really like how easy modules and packages are in comparison to C/C++ (which does not support modules). But how good are they with Information Hiding? (no private data in Python).
You scan the build files, find all build units affected by the changes in the build unit(s) the module belongs to, rebuild them, and run test build units (i.e. unit tests) which depend on them.An issue with large systems is managing the dependency graph, e.g. when a well-known public data structure change how does it impact the modules etc.?I am working on a very large Python codebase at work. Things are fine, because we are strict about code consistency, dependency management and having a single version of everything (no "DLL hell").
Single underscore is still public; seems double underscore is needed.ISayMoo:Code: Select allclass PointTest: # Counterexample: class with "private" attributes def __init__(self,x=-10, y=0): #default values self.move(x,y) def move(self, x, y): self._x = x self._y = y self.__x = x self.__y = y def printI(self): print (self._x, self._y) def printII(self): print (self.__x, self.__y) pp = PointTest(1,2) pp._x = -1; pp._y = -2 print("Private in name only? (PINO)") print(pp._x); print(pp._y); #-1, -2 #print(pp.__x); print(pp.__y); #AttributeError pp.printI() #(-1,-2) pp.printII() #(1,2)
There are private data in Python. They are denoted by convention by an underscore in front of variable name. Any linter can catch this.I really like how easy modules and packages are in comparison to C/C++ (which does not support modules). But how good are they with Information Hiding? (no private data in Python).