[Python-Dev] fileobj.read(float): warning or error?

Victor Stinner victor.stinner at haypocalc.com
Wed Jul 23 01:43:18 CEST 2008


Le Monday 21 July 2008 21:23:21, vous avez écrit :
> > It should raises an error instead of a warning, it has no sense to read a
> > partial byte :-) But that should breaks some applications?
>
> This doesn't come into effect until 3.0.

Would it possible to create an option "strict mode" which disallow dangerous 
cast? Especially in PyArg_Parse*() functions.

--

I hate "transparent" cast, like C and PHP do everywhere. The 
worst "transparent" cast in Python (2.x) is between str (bytes) and unicode 
(characters) types.

Victor Stinner aka haypo


More information about the Python-Dev mailing list