Deitel Presents How Keyword Import Affects Namespaces in Python Programming
This article from Deitel™ discusses how the various forms of the import statement affect a program's namespace. We explore all the forms of the statement and use function dir in interactive sessions to demonstrate the import statement's effects on the namespace. Readers should be familiar with defining functions, importing modules, basic scoping and namespaces and function dir. The code examples included in this article show readers examples using the Deitel™ signature Live-Code™ Approach, which presents all concepts in the context of complete working programs followed by the screen shots of the actual inputs and outputs.