[pypy-issue] [issue1397] file stream behavior differences from cpython

bdk tracker at bugs.pypy.org
Wed Feb 13 23:31:04 CET 2013

bdk <bdkearns at gmail.com> added the comment:

Surely one can use it as a file stream and then afterwards as a fd? And then 
have some expectations about the interactions?

Cpython docs explicitly state "File objects are implemented using C’s stdio 
package" and other things like "This function is simply a wrapper for the 
underlying fread() C function, and will behave the same in corner cases, such as 
whether the EOF value is cached."

Surely someone might depend on these behaviors, that file objects behave as 
stdio streams with regards to interactions with low level file descriptor calls?

I don't see any note in pypy's 'differences from cpython' doc either.

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list