list.__init__(a, sequence=[0, 1, 2])
vereq(a, [0, 1, 2])
+def recursive__call__():
+ if verbose: print ("Testing recursive __call__() by setting to instance of "
+ "class ...")
+ class A(object):
+ pass
+
+ A.__call__ = A()
+ try:
+ A()()
+ except RuntimeError:
+ pass
+ else:
+ raise TestFailed("Recursion limit should have been reached for "
+ "__call__()")
+
def delhook():
if verbose: print "Testing __del__ hook..."
log = []
buffer_inherit()
str_of_str_subclass()
kwdargs()
+ recursive__call__()
delhook()
hashinherit()
strops()
Core and builtins
-----------------
+- Bug #532646: The object set to the __call__ attribute has its own __call__
+ attribute checked; this continues until the attribute can no longer be found
+ or segfaulting. Recursion limit is now followed.
+
- Bug #1454485: Don't crash on Unicode characters <0.
- Patch #1488312, Fix memory alignment problem on SPARC in unicode
ternaryfunc call;
if ((call = func->ob_type->tp_call) != NULL) {
+ if (Py_EnterRecursiveCall(" in __call__"))
+ return NULL;
PyObject *result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
if (result == NULL && !PyErr_Occurred())
PyErr_SetString(
PyExc_SystemError,