This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Ramchandra Apte, demian.brecht, ishimoto, lemanyk1, orsenthil, tim.golden, tzs, vstinner
Date 2014-12-12.12:12:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418386326.0.0.593764216401.issue15267@psf.upfronthosting.co.za>
In-reply-to
Content
Catching TypeError on len() looks as an ugly test to check if body is a string. Why not doing the opposite: first to call fileno() and call AttributeError? Or even use hasattr(body, "fileno")?
History
Date User Action Args
2014-12-12 12:12:06vstinnersetrecipients: + vstinner, ishimoto, orsenthil, tim.golden, Ramchandra Apte, tzs, lemanyk1, demian.brecht
2014-12-12 12:12:05vstinnersetmessageid: <1418386326.0.0.593764216401.issue15267@psf.upfronthosting.co.za>
2014-12-12 12:12:05vstinnerlinkissue15267 messages
2014-12-12 12:12:05vstinnercreate