diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2019-09-04 01:25:40 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2019-09-04 01:58:22 -0400 |
commit | 3238a0d7d003fb869ca106b18365162a78a7d4e0 (patch) | |
tree | d760c50f0c5a4536620f510a5d9f8de3ee30bded /numpy/lib/tests/test_arraypad.py | |
parent | e3f4c536a0014789dbd0321926b4f62c39d73719 (diff) | |
download | numpy-3238a0d7d003fb869ca106b18365162a78a7d4e0.tar.gz |
BUG: Fix format statement associated with AttributeError.
Before this fix, a reference such as `numpy.wxyz` produced an
incorrect error message because of the invalid format specifiers
in the error message string:
>>> import numpy
>>> numpy.wxyz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../numpy/__init__.py", line 206, in __getattr__
"module %s has no attribute $s".format(__name__, attr))
AttributeError: module %s has no attribute $s
After the fix:
>>> import numpy
>>> numpy.wxyz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../numpy/__init__.py", line 206, in __getattr__
"{!r}".format(__name__, attr))
AttributeError: module 'numpy' has no attribute 'wxyz'
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
0 files changed, 0 insertions, 0 deletions