Staging
v0.5.1
https://github.com/python/cpython
Revision 956597f4ef4ef4c65b0a5a7e488757d865832a0e authored by Andrew M. Kuchling on 29 July 2006, 18:14:07 UTC, committed by Andrew M. Kuchling on 29 July 2006, 18:14:07 UTC
We want to encourage users to write open() when opening a file, but
open() was described with a single paragraph and
'file' had lots of explanation of the mode and bufsize arguments.

I've shrunk the description of 'file' to cross-reference to the 'File
objects' section, and to open() for an explanation of the arguments.

open() now has all the paragraphs about the mode string.  The bufsize
argument was moved up so that it isn't buried at the end; now there's
1 paragraph on mode, 1 on bufsize, and then 3 more on mode.  Various
other edits and rearrangements were made in the process.

It's probably best to read the final text and not to try to make sense
of the diffs.
1 parent fbdeaad
Raw File
Tip revision: 956597f4ef4ef4c65b0a5a7e488757d865832a0e authored by Andrew M. Kuchling on 29 July 2006, 18:14:07 UTC
Reorganize the docs for 'file' and 'open()' after some discussion with Fred.
Tip revision: 956597f
sigcheck.c

/* Sigcheck is similar to intrcheck() but sets an exception when an
   interrupt occurs.  It can't be in the intrcheck.c file since that
   file (and the whole directory it is in) doesn't know about objects
   or exceptions.  It can't be in errors.c because it can be
   overridden (at link time) by a more powerful version implemented in
   signalmodule.c. */

#include "Python.h"

/* ARGSUSED */
int
PyErr_CheckSignals(void)
{
	if (!PyOS_InterruptOccurred())
		return 0;
	PyErr_SetNone(PyExc_KeyboardInterrupt);
	return -1;
}
back to top