should you create a factory method to create tkinter widgets or is it considered best practice not to?
for example a program with say 10 entry boxes, 5 buttons, and 16 labels (just random numbers) would have 31 occurences of pretty much the same code most commonly like this:
self.a_widget = ttk.widget_type(self,text="hello world!")
self.a_widget.config(foreground="white",background="black")
self.a_widget.config(font=("Calibri",15,"bold"))
self.a_widget.pack()
so creating a factory method for this could be fairly straight forward and would certainly prevent having nearly the same code over and over.
would doing so be beneficial for future use or is something like this discouraged?