Esempio n. 1
0
c = 5
d = 10
from module import adder # Copy out an attribute
result = adder(c, d) # No need to qualify name
print(result)
from module import a, b, multiplier # Copy out multiple attributes

result = multiplier(a,b)
print(result)
Esempio n. 2
0
import module       # Get module as a whole
result = module.adder(module.a, module.b) # Qualify to get names
print(result)
Esempio n. 3
0
import module
result = module.adder(module.a, module.b)
print(result)
Esempio n. 4
0
c = 5
d = 10
from module import adder
result = adder(c, d)
print(result)

from module import a, b, multiplier
result = multiplier(a, b)
print(result)