On Fri, Sep 3, 2010 at 12:03 AM, Corbin Simpson
<[email protected]> wrote:
> Hopefully I am doin' it right. invalid_argument seems like the correct
> analogue to ValueError.
Yes. Thanks!
> GMail shouldn't mangle this, but it wouldn't be the first time.
Could you send it as an attachment? Also, if you use hg to make the
patch (type make repo to upgrade cython directory to the full hg
repository) it will have metadata such as a changelog entry and
username attached, which would be preferable.
- Robert
> ~ C.
>
> --- Compiler/ExprNodes.py.back 2010-09-02 23:57:02.000000000 -0700
> +++ Compiler/ExprNodes.py 2010-09-02 23:46:30.000000000 -0700
> @@ -7028,6 +7028,9 @@
> ; // let the latest Python exn pass through and ignore the current one
> else
> throw;
> + } catch (const std::invalid_argument& exn) {
> + // Catch invalid_argument explicitly and raise a ValueError
> + PyErr_SetString(PyExc_ValueError, exn.what());
> } catch (const std::out_of_range& exn) {
> // catch out_of_range explicitly so the proper Python exn may be raised
> PyErr_SetString(PyExc_IndexError, exn.what());
>
>
> --
> When the facts change, I change my mind. What do you do, sir? ~ Keynes
>
> Corbin Simpson
> <[email protected]>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev