A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-March/138923.html below:

[Python-Dev] peps: New PEP 490: Chain exceptions at C level

[Python-Dev] peps: New PEP 490: Chain exceptions at C level [Python-Dev] peps: New PEP 490: Chain exceptions at C levelSerhiy Storchaka storchaka at gmail.com
Thu Mar 26 10:11:51 CET 2015
On 26.03.15 10:08, victor.stinner wrote:
> https://hg.python.org/peps/rev/7daf3bfd9586
> changeset:   5741:7daf3bfd9586
> user:        Victor Stinner <victor.stinner at gmail.com>
> date:        Thu Mar 26 09:08:08 2015 +0100
> summary:
>    New PEP 490: Chain exceptions at C level

> +Python 3.5 introduces a new private ``_PyErr_ChainExceptions()`` function which
> +is enough to chain manually exceptions.

It also was added in Python 3.4.3.

I meditar about adding _PyErr_ReplaceException() in 2.7 for simpler 
backporting patches from 3.x.

> +Functions like ``PyErr_SetString()`` don't chain automatically exceptions. To
> +make usage of ``_PyErr_ChainExceptions()`` easier, new functions are added:
> +
> +* PyErr_SetStringChain(exc_type, message)
> +* PyErr_FormatChaine(exc_type, format, ...)

Typo.

> +* PyErr_SetNoneChain(exc_type)
> +* PyErr_SetObjectChain(exc_type, exc_value)

I would first make these functions private, as _PyErr_ChainExceptions(). 
After proofing their usefulness in the stdlib, they can be made public.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4