[New-bugs-announce] [issue41542] module `__all__` cannot detect function name with `φ`

Tianrui Luo report at bugs.python.org
Thu Aug 13 14:46:53 EDT 2020


New submission from Tianrui Luo <tianrluo at umich.edu>:

Fairly easy to reproduce.

`__all__` in a module seems unable to track name with `φ`.
The following minimal reproducing example also fails for function name of `aφ` or `φb`.

```python3
Python 3.7.7 (default, May  7 2020, 21:25:33)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tmp import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'tmp' has no attribute 'ϕ'
```

The `tmp.py` file.
```python
# tmp.py

__all__ = ['ϕ']


def ϕ():
    print('"__all__" doesn\'t like me')
    return
```

----------
components: Unicode
messages: 375330
nosy: ezio.melotti, tianrluo, vstinner
priority: normal
severity: normal
status: open
title: module `__all__` cannot detect function name with `φ`
type: behavior
versions: Python 3.7

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


More information about the New-bugs-announce mailing list