[Python-ideas] os.path.isbinary

Philipp A. flying-sheep at web.de
Mon Aug 12 15:42:23 CEST 2013


well, the only remotely valid thing to do is to test if the input data is
decodable with any of the encodings python knows.

if we do some arbitrary threshold, we only get bugs like fedora’s current
release name “Schrödinger's Cat” being considered “not text”. i’d never
write code like
this<https://github.com/hwoarang/libreport/blob/master/src/lib/problem_data.c#L272>
.

PS: why do people still convert stuff to float? we live in python3 world,
where 1/2 is 0.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130812/0f3e3dc8/attachment.html>


More information about the Python-ideas mailing list