Closed ShaunKulesa closed 3 years ago
I would avoid star imports because it really pollutes the module. It's not really recommended.
You can import specific objects or shorten the imported module name instead
# Shorten the imported module name
import tkinter as tk
tk.Tk()
# Import specific objects
from tkinter import Tk
Tk()
It can make sense in some cases, but it gets messy as programs grow. Code inspection tools and linters are not a fan of star imports.
if you do
from tkinter import *
you wont have to doroot = tkinter.Tk()
instead you can doroot = Tk()