Berker Peksag added the comment: > Should we file a separate issue regarding the similarly vague error message > from hasattr() itself?
+1 from me. It would be good to show users a user friendly message :) > BytesWarning: Comparison between bytes and string How about raising a TypeError if ``all(isinstance(l, str) for l in fromlist)`` is False? That would make the exception message less clearer since we can't include the "[...] not 'bytes'" part though. ---------- keywords: -easy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com