Message27205
Logged In: YES
user_id=31435
paul_g's option #1 is the only that takes no work, so is the
only one I'm volunteering for <0.5 wink>. Docs would be
good. #4 is in general impossible short of Python
implementing its own I/O -- "the last" operation done on a C
stream isn't necessarily visible to the Python
implementation (extensions can and do perform their own I/O
on C streams directly via platform C stdio calls -- Python
has no way to know about that now even in theory).
BTW, I don't understand:
"""1. in the f.read()+f.write()+f.read() case, the f.write()
generates an IOError. this deviates from ansi c, but is in
line with msdn docs."""
All behavior in that case is explicitly not defined by ANSI
C if there isn't a file-positioning operation too between
the read() and write(), and again between the write() and
read(). Raising an exception is fine by ANSI C in that
case. So is a segfault. So is reading nothing, or reading
a terabtye, or wiping the disk clean, etc: nothing is
defined about it. |
|
Date |
User |
Action |
Args |
2007-08-23 14:37:04 | admin | link | issue1394612 messages |
2007-08-23 14:37:04 | admin | create | |
|