# Reification of a lazily imported module on a specific case

**URL:** <https://discuss.python.org/t/reification-of-a-lazily-imported-module-on-a-specific-case/109776>\
**Category:** Python Help\
**Tags:** help\
**Created:** [October 30, 2026, 9:28pm UTC](https://discuss.python.org/t/reification-of-a-lazily-imported-module-on-a-specific-case/109776 "2026-10-30T21:28:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![facundo](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/facundo/32/53_2.png) [@facundo](https://discuss.python.org/u/facundo)\
**Post date:** [October 30, 2026, 9:28pm UTC](https://discuss.python.org/t/reification-of-a-lazily-imported-module-on-a-specific-case/109776/1 "2026-10-30T21:28:45Z")

</div>

Hello!

What is the rationale behind triggering the import of the module when it’s internals are not really accessed?

E.g.:

```python
lazy import cmd1
mods = [cmd1]

```

Thanks!  
. Facundo

---

<div class="post-metadata">

**Author:** ![DavidCEllis](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/davidcellis/32/9789_2.png) [@DavidCEllis](https://discuss.python.org/u/DavidCEllis)\
**Post date:** [November 1, 2026, 8:40am UTC](https://discuss.python.org/t/reification-of-a-lazily-imported-module-on-a-specific-case/109776/3 "2026-11-01T08:40:04Z")

</div>

The decision was made to have lazy imports trigger when the name is retrieved from globals, rather than when the object is subsequently accessed. From the PEP:

> Accessing a lazy object (from a global variable or a module attribute) reifies the object.

Adding the module to the list performs this lookup and triggers the import.

Allowing you to put the lazy imports in a list like this without resolving them would essentially require some kind of in-place transformation, while doing so on lookup avoids this. The rejected ideas section in the PEP has an explanation of [why they chose not to use a ` __class__ ` mutation](https://peps.python.org/pep-0810/#transforming-lazy-objects-via-class-mutation) which covers some of this.

---

<div class="post-metadata">

**Author:** ![facundo](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/facundo/32/53_2.png) [@facundo](https://discuss.python.org/u/facundo)\
**Post date:** [November 1, 2026, 10:01pm UTC](https://discuss.python.org/t/reification-of-a-lazily-imported-module-on-a-specific-case/109776/4 "2026-11-01T22:01:54Z")

</div>

@DavidCEllis thanks!
