Message2365

Author ellisj
Recipients
Date 2004-02-24.20:56:28
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Sanity checking of the closure supplied via new.function.

Note that test_closure(g, None, TypeError) still fails
because jython raises a ValueError instead of a
TypeError.  (Because Jython sees None and turns it into
a null PyObject[], indistinguishable from no closure at
all.)  Fixing this would require changing the signature
of the PyFunction constructor to take PyObject
(PyTuple) instead of PyObject[] which would require a
substantial rewrite of CodeCompiler's
visitFunctionDef/makeClosure methods.  It's doable but
since the new module is deprecated in Python 2.3 anyway
I don't think it's really worth all that trouble to
match CPython's exact exception in a fairly obscure case.
History
Date User Action Args
2008-02-20 17:18:24adminlinkissue903723 messages
2008-02-20 17:18:24admincreate