Vitja Makarov, 23.03.2011 17:25:
def f():
     return lambda x=0: x
f()()

Gives me this bogus code at function entry:

    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)0);  // <<<<<<< !!!

Looks like the default value is considered an int, whereas x is of type object, and there's a coercion missing between the two.

Stefan
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to