[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

Kolen Cheung report at bugs.python.org
Sun Aug 22 16:55:35 EDT 2021


New submission from Kolen Cheung <christian.kolen at gmail.com>:

With Python 3.9.6 on macOS,

In a file all_bug.py,

```py
__all__ = ("ϵ",)
ϵ = "ϵ"
```

Then run `from all_bug import *`, resulted in

    AttributeError: module 'all_bug' has no attribute 'ϵ'

This happens with some other unicode characters as well, but not all. I can provide them if needed.

Removing the `__all__` line will successfully import ϵ and be used.

----------
messages: 400106
nosy: christian.kolen
priority: normal
severity: normal
status: open
title: `module has no attribute` when `__all__` includes certain unicode characters
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44981>
_______________________________________


More information about the Python-bugs-list mailing list