Is there a tool to verify that Python code complies with the Demeter law?
I found a mention of Demeter in pychecker, but it seems that the tool understands this law different from what I expect: http://en.wikipedia.org/wiki/Law_of_Demeter
Wikipedia definition: Demeter's law for functions requires that the method M of an object O can only call methods of the following types of objects:
- O myself
- M parameters
- any objects created / created in M
- O direct component objects
- global variable available O in area M
source
share