You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Side effects should be considered a code smell - currently, when importing a module, if it is not specified what you want from the module, it will effectively load and execute the module without binding anything to the current scope. I don't really like this, so instead it should just default to assigning everything to a new variable of the same "name":
import"math"// import and assign to the variable "math" by defaultprint(math.pi)
import"math"asm// import and assign to the variable "m"
importpifrom"math"// import only "pi" and assign to variable "pi"
importpi,e,taufrom"math"// import only "pi", "e", and "tau" and assign to their respective variables
importabsasabsolutefrom"math"// import only "abs" and assign to variable "absolute"
The text was updated successfully, but these errors were encountered:
Side effects should be considered a code smell - currently, when importing a module, if it is not specified what you want from the module, it will effectively load and execute the module without binding anything to the current scope. I don't really like this, so instead it should just default to assigning everything to a new variable of the same "name":
The text was updated successfully, but these errors were encountered: