[hblink3:master] reported: added second rules example rules_SAMPLEv2.py #github

HBlink@DVSwitch.groups.io Integration <HBlink@...>

[hblink3:master] New Comment on Pull Request #7 added second rules example rules_SAMPLEv2.py
By randybuildsthings:

Okay, had another look and realized that you've turned the rules.py into code instead of just a data structure.

Generally speaking, I don't get excited about turning configuration into code like this. If this were an example of domain-specific language for configuration, that would be useful indeed, but this is really going to lead to more copy/paste code in the long-run. It's clever, and I think it's good as a solution to a sticky data structure problem, but I don't think we want to start putting stuff like this in the main folder. It will only confuse most users.

I'd be open to exploring an "examples" folder under the project root where this could go. I am not 100% sure if it's the right way to proceed. It really needs even more documentation than it already has, so that the data structure being built in the procedure is also commented.

What do you think?

Join HBlink@DVSwitch.groups.io to automatically receive all group messages.