[Python-ideas] os.path.isbinary

Ryan rymg19 at gmail.com
Mon Aug 12 18:55:06 CEST 2013


I wrote it on SL4A Python 2.6. That explains the implicit float conversion. SL4A's Python 3 takes up too much of my data partition.

"Philipp A." <flying-sheep at web.de> wrote:

>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

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130812/71c76109/attachment.html>


More information about the Python-ideas mailing list