Vish - I think we need your help as PTL. The barrier is a difference of opinion between termie and myself over how to discover classes that perform checks.
I want to find checks the "Java way", using typing. We create a checker by deriving from Checker, perhaps indirectly. If we want to know if a class is a checker, we check the type.
Termie wants to be more "Pythonic". A Checker simply implements the correct method e.g. run_check. We catch the missing-method exception and assume that the class isn't a checker.
I feel that the Pythonic way doesn't get us very much, but we have to give up help from our compiler & toolset. For example, if we were to rename the 'run_check' method, we'd need to change every Checker. Or a Checker implementation might fat-finger the method name. In both cases, the Java approach gives us lots of help - runtime & static analysis checkers - while the Pythonic approach offers us no help at all. I just don't see what we get in return.
In general, this is what we see throughout the code base, where we don't have a well-defined contract, so different implementations don't work homogeneously and we have lots of bugs that we wouldn't have if we allowed our toolset to help us.
Vish - I think we need your help as PTL. The barrier is a difference of opinion between termie and myself over how to discover classes that perform checks.
I want to find checks the "Java way", using typing. We create a checker by deriving from Checker, perhaps indirectly. If we want to know if a class is a checker, we check the type.
Termie wants to be more "Pythonic". A Checker simply implements the correct method e.g. run_check. We catch the missing-method exception and assume that the class isn't a checker.
I feel that the Pythonic way doesn't get us very much, but we have to give up help from our compiler & toolset. For example, if we were to rename the 'run_check' method, we'd need to change every Checker. Or a Checker implementation might fat-finger the method name. In both cases, the Java approach gives us lots of help - runtime & static analysis checkers - while the Pythonic approach offers us no help at all. I just don't see what we get in return.
In general, this is what we see throughout the code base, where we don't have a well-defined contract, so different implementations don't work homogeneously and we have lots of bugs that we wouldn't have if we allowed our toolset to help us.