Staging
v0.5.1
https://github.com/python/cpython
Revision 1028ca4f04c14cf40a8f3e7951623a96ec0143c2 authored by Miss Islington (bot) on 10 March 2018, 15:10:45 UTC, committed by Nick Coghlan on 10 March 2018, 15:10:45 UTC
`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
(cherry picked from commit 308eab979d153f1ab934383dc08bc4546ced8b6c)

Co-authored-by: Eric Appelt <eric.appelt@gmail.com>
1 parent 19b42fe
Raw File
Tip revision: 1028ca4f04c14cf40a8f3e7951623a96ec0143c2 authored by Miss Islington (bot) on 10 March 2018, 15:10:45 UTC
bpo-26701: Add documentation for __trunc__ (GH-6050)
Tip revision: 1028ca4
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