PEP 342 implementation. Per Guido's comments, the generator throw()

method still needs to support string exceptions, and allow None for the
third argument.  Documentation updates are needed, too.
This commit is contained in:
Phillip J. Eby 2005-08-02 00:46:46 +00:00
parent d794666048
commit 0d6615fd29
16 changed files with 862 additions and 242 deletions

View file

@ -65,6 +65,7 @@ PyAPI_FUNC(char *) PyEval_GetFuncDesc(PyObject *);
PyAPI_FUNC(PyObject *) PyEval_GetCallStats(PyObject *);
PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *);
PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(struct _frame *f, int exc);
/* this used to be handled on a per-thread basis - now just two globals */
PyAPI_DATA(volatile int) _Py_Ticker;

View file

@ -76,3 +76,4 @@
#define gen_if 331
#define testlist1 332
#define encoding_decl 333
#define yield_expr 334

View file

@ -25,6 +25,7 @@ PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
PyAPI_DATA(PyObject *) PyExc_Exception;
PyAPI_DATA(PyObject *) PyExc_StopIteration;
PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
PyAPI_DATA(PyObject *) PyExc_StandardError;
PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
PyAPI_DATA(PyObject *) PyExc_LookupError;