Nick Coghlan <ncogh...@gmail.com> added the comment:

While I like the idea of this change, the "partially initialized" addition is 
fairly subtle, and relatively easy to miss.

Perhaps append "(most likely due to a circular import)" to the partially 
initialized case?:

    AttributeError: partially initialized "module 'spam' has no attribute 'ham' 
(most likely due to a circular import).

Crucially, for folks encountering the error for the first time, that also 
introduces them to the main phrase they may want to search for: "circular 
import".

The "most likely" weasel wording stems from the fact that the problem won't 
always be with the circular import - they may have just straight up referenced 
the wrong module or the wrong attribute name, so the apparently circular import 
is an error.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to