dot notation
You have made it to the end of this book. Do you understand these?
module
module.variable
defined in
module.pyvariable = Noneused in a different file
import module module.variable
module.function()
defined in
module.pydef function(): return Nonecalled in a different file
import module module.function()
module.function(*args, **kwargs)
defined in
module.pydef function(*args, **kwargs):called in a different file
import module module.function(*args, **kwargs)
module.AClass.attribute
defined in
module.pyclass AClass(object): attribute = Noneused in a different file
import module child = module.AClass() child.attributedefined in
module.pywith__init__()methodclass AClass(object): def __init__(self, attribute=None): self.attribute = attributeused in a different file and setting the value for
attributeimport module child = module.AClass(attribute='Attribute') child.attribute
module.AClass.method()
defined in
module.pyclass AClass(object): def method(self): return Noneused in a different file
import module child = module.AClass() child.method()
module.AClass.method(*args, **kwargs)
defined in
module.pyclass AClass(object): def method(self, *args, **kwargs): return Noneused in a different file
import module child = module.AClass() child.method(*args, **kwargs)
rate pumping python
If this has been a 7 star experience for you, please CLICK HERE to leave a 5 star review of pumping python. It helps other people get into the book too