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.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list