Whats the difference between normal and wild card imports?

Was wondering, what is the difference between importing a module and a wild card import? Don’t both import all of the module’s contents?

import tkinter # Normal
from tkinter import * # Wild Card
2 Likes

Disclaimer: I don’t know tkinter’s calls, so I’ll use my package instead.

Normal requires you to reference the package:

import firepup650 as fp # Normal
one = fp.replit_input("What's your favorite number?", int)
if one == 1:
    fp.cprint("one!")
else:
    fp.cprint(one)

Wildcard imports it directly:

from firepup650 import * # Wild Card
one = replit_input("What's your favorite number?", int)
if one == 1:
    cprint("one!")
else:
    cprint(one)

Hope this helps!

4 Likes

No wonder people say you shouldn’t use those. That clutters your space a ton. Thank you for the reply!

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.