3 ms·
> Importing the module is not sufficient: really, the functions (or any other imported objects) themselves need to be named. (or, the function needs to be quali
by thaumasiotes 5y ago
> Importing the module is not sufficient: really, the functions (or any other imported objects) themselves need to be named. (or, the function needs to be qualified with the name of the module; actually, Python seems to do a reasonable job at this)
Well, in Python you can do it well or poorly at your own discretion.
Good:
from module import fun
...
fun()
import module as m
...
m.fun()
Bad:
from module import *
...
fun()
- jraph 5y agoIndeed, import * should be avoided.