I'm trying to adapt this answer to use-package elegantly. It requires that I hook a lambda function to python-mode. I came up with this solution — which works:
(use-package python :hook (python-mode . (lambda () (setq indent-tabs-mode t) (setq tab-width 4) (setq python-indent-offset 4))))
but I find it inelegant, as it requires me to repeat "python-mode" inside the use-package for python (shouldn't that be obvious?). Is there a better way, and if not, why? I'm not sure I understand well the hook process in use-package.