I kindof dislike this as well, but I don't know of a more automatic yet readable way to do this. Using `locals()` is even worse. Perhaps there exists a good pattern, but I've not seen it.