Import alias
An import alias is an alternate name bound to an imported module, namespace, or other imported program element for use in source code.
Python Workout: 50 ten-minute exercises
A module alias is an alternate name bound to an imported module by an import statement using as.
- How it is used
- Shortens module references when names are long or used repeatedly.
- How deep it goes
- Defines alias syntax and namespace behavior, but stops short of deeper import machinery.
- Examples
- Uses mymod as mm and numpy as np as concrete alias forms.
- What you can do after
- Apply module aliases through Python import statements and use the bound name in subsequent references.
Read how Python Workout: 50 ten-minute exercises explains import alias →
Elixir in Action, Third Edition
An alias is an Elixir directive that binds an alternate name to a module for use in references.
- How it is used
- Reduces qualified-module naming noise when repeatedly calling modules in deep application hierarchies.
- How deep it goes
- Defines explicit and inferred names, then connects aliases to atom-based module resolution and BEAM loading.
- Examples
- Uses Geometry.Rectangle, IO as MyIO, Rectangle.area, and MyIO.puts to demonstrate shortened references.
- What you can do after
- Apply it via Elixir syntax to shorten repeated module references while preserving the resolved module identity.
Read how Elixir in Action, Third Edition explains import alias →
Refactoring to Rust
An import alias is an alternate local name assigned to an imported Rust item or path.
- How it is used
- Simplifies repeated imports and shapes a library’s public API by exposing stable, shorter paths.
- How deep it goes
- Explains local imports, `pub use`, re-exports, module hierarchy, and visibility, but stops short of broader aliasing forms.
- Examples
- Uses a greeter application’s `DayKind` imports and a forest crate’s deeply nested `enter` function.
- What you can do after
- Apply it via Rust `use` and `pub use` to shorten imports and present controlled crate-root names.
Related concepts
- namespace collisionaddresses · A namespace collision occurs when distinct software entities use the same identifier within a shared naming scope, causing ambiguity or conflict.
- moduleuses · A module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
- alias tableconfigures · An alias table is a namespace-associated mapping from aliases to the namespaces they designate.
- atomkind of · An atom is an Elixir named constant whose text is stored in the runtime atom table and whose value is a reference to that text.
- import statementconfigures · An import statement is a source-code declaration that makes names or definitions from another module, package, or namespace available in the current scope.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


