R. David Murray <rdmur...@bitdance.com> added the comment: We generally don't do advance type checking (look before you leap) in Python. This allows a type the programmer hadn't planned for to be used as long as it "quacks like" the expected type (this is called duck typing). So the error was produced exactly where it should be and exactly as it should be: it was produced by the StringIO object you provided, when quopri tried to write the binary output that it produces to the object you handed it.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32268> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com