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/2012-February/116064.html below:

[Python-Dev] docs fixes and PEP 409

[Python-Dev] docs fixes and PEP 409Nick Coghlan ncoghlan at gmail.com
Wed Feb 1 06:57:44 CET 2012
On Wed, Feb 1, 2012 at 3:07 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> I'm looking at the docs to make the relevant changes due to PEP 409, and I'm
> noticing some problems.
>
> E.g. The PyException_Get|Set_Context|Cause all talk about using NULL to
> clear the related attribute, when actually in should be Py_None.
>
> Only PyException_GetCause is directly related to PEP 409 -- should I only
> fix that one, and open up a new issue on the tracker for the other three, or
> should I fix all four now?

Passing in NULL is the right way to clear them using those APIs - the
descriptors in exceptions.c then control how "not set" is exposed at
the Python layer.

So only Get/SetCause should need updating for PEP 409 to say to pass
in NULL to clear the cause and fall back on displaying the context and
Py_None to suppress the context in the default display.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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