Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: I don't think the index in error message is needed. Unlike to str.join() which accepts arbitrary iterables of arbitrary names, the fromlist usually is a short tuple.
Interesting, what happen if the fromlist is not a list or tuple? >>> __import__('encodings', fromlist=iter(('aliases', b'codecs'))) <module 'encodings' from '/home/serhiy/py/cpython/Lib/encodings/__init__.py'> Import is successful because the iterator was exhausted by "'*' in fromlist". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue21720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com