# Modify 'import' command

**URL:** <https://discuss.python.org/t/modify-import-command/109468>\
**Category:** Python Help\
**Created:** [October 13, 2026, 9:10pm UTC](https://discuss.python.org/t/modify-import-command/109468 "2026-10-13T21:10:31Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![petercordia](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@petercordia](https://discuss.python.org/u/petercordia)\
**Post date:** [October 19, 2026, 9:59pm UTC](https://discuss.python.org/t/modify-import-command/109468/29 "2026-10-19T21:59:53Z")

</div>

The work your computer needs to do to remove those TYPE\_CHECKING clauses is significantly more than the work your computer needs to do to parse those clauses into byte code and then ignore them.

Regarding constants, which you’re apparently still going on about, it is hard to conceive of a system that will be more performant than

```python
# config.py
WINDOW_WIDTH = 64

# your_other_modules
import config

print(config.WINDOW_WIDTH)

# or_otherwise_in_yet_other_modules
from config import WINDOW_WIDTH

window = "*" * WINDOW_WIDTH

```

I know you crafted a whole alternative “more performant” system which you described in [Type hint ignore all references to a particular variable?](https://discuss.python.org/t/type-hint-ignore-all-references-to-a-particular-variable/109378), but have you actually measured any performance improvement? I’d be extremely surprised if you can demonstrate any. But go ahead, share some demonstration code if you succeed ^^.

This is incidentally, why people were asking you why you need this functionality. Because many of us suspected that you want to do something silly like this.

But I say, go ahead. It’s all in good fun I hope? Figure out how to replace all “logger.info” with “print” before code is turned into byte code, for “optimization” 😉 If you figure out how to do it and share how it works, I’ll learn something too.

---

_[View the full topic](https://discuss.python.org/t/modify-import-command/109468)._
