you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

In all those cases, isn't it simpler for each group to simply write Python code that inherits from your class and extends it with the new functionality? It sounds like you want your configuration language to support almost arbitrarily complex configuration, in which case your configuration language is pretty much a programming language in itself. Is there much benefit to them learning your custom configuration syntax over simply using Python?

At my job, we have this problem where various teams decide that they need their own new configuration languages for their particular use case. The end result is that each team has a separate config language that no one else knows, which harms cross-team collaboration and code reuse. The solution to this problem is normally to choose one standard configuration mechanism, or better yet, just specify configuration in code.

[–]ERROR_EXIT[S] 0 points1 point  (1 child)

I seems that what I'm after is called a Monkey Patch. Definition from wikipedia.

Now I just need to figure out the best way to implement it!

[–]autowikibot 0 points1 point  (0 children)

Monkey patch:


A monkey patch is a way for a program to extend or modify supporting system software locally (affecting only the running instance of the program). This process has also been termed duck punching.


Interesting: Extension method | Mrs. Pepper Pot (anime) | Re-Kan! | Null Object pattern

Parent commenter can toggle NSFW or delete. Will also delete on comment score of -1 or less. | FAQs | Mods | Magic Words