Staging
v0.5.1
https://github.com/python/cpython
Revision 8284c4a7fb27efd55323513572e247a895a35ae1 authored by Raymond Hettinger on 06 February 2008, 20:47:09 UTC, committed by Raymond Hettinger on 06 February 2008, 20:47:09 UTC
In its previous form, it always returned instance of frozenset which makes this ABC
nearly useless as a mixin.  In its new form, it needs to be able to assume that the
constructor will take a frozenset input.  This will usually be true.  If it is not,
then only one method (this one) will need to be overriden by the subclass to let
it know about the unique constructor signature.  Will add info on this to the docs.
1 parent ebcee3f
Raw File
Tip revision: 8284c4a7fb27efd55323513572e247a895a35ae1 authored by Raymond Hettinger on 06 February 2008, 20:47:09 UTC
Fix-up the _from_iterable() method to return instances of the subclass where it is used.
Tip revision: 8284c4a
traceback.h

#ifndef Py_TRACEBACK_H
#define Py_TRACEBACK_H
#ifdef __cplusplus
extern "C" {
#endif

struct _frame;

/* Traceback interface */

typedef struct _traceback {
	PyObject_HEAD
	struct _traceback *tb_next;
	struct _frame *tb_frame;
	int tb_lasti;
	int tb_lineno;
} PyTracebackObject;

PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *);
PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);

/* Reveal traceback type so we can typecheck traceback objects */
PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
#define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type)

#ifdef __cplusplus
}
#endif
#endif /* !Py_TRACEBACK_H */
back to top