Why utils are bad, an example

1 mooreds 1 7/4/2025, 2:37:57 PM swizec.com ↗

Comments (1)

gladiatr72 · 18m ago
What's really f'd up is when you double-down. When I was writing a lot of Saltstack modules, I'd import internal modules by first checking if it was already registered with the interpreter. If so, setting a reference in the local namespace. If it wasn't already referenced, it would be imported the typical way.

In my defense, this was to get at non-trivial functionality that was buried in a core or 1st tier module. It wasn't good python, but I like to look at it as an example of good problem solving.