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.AnObject.attribute
defined in
module.pyclass AnObject(object): attribute = Noneused in a different file
import module child = module.AnObject() child.attributedefined in
module.pywith__init__()methodclass AnObject(object): def __init__(self, attribute=None): self.attribute = attributeused in a different file and setting the value for
attributeimport module child = module.AnObject(attribute='Attribute') child.attribute
module.AnObject.method()
defined in
module.pyclass AnObject(object): def method(self): return Noneused in a different file
import module child = module.AnObject() child.method()
module.AnObject.method(*args, **kwargs)
defined in
module.pyclass AnObject(object): def method(self, *args, **kwargs): return Noneused in a different file
import module child = module.AnObject() 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.