[Python-Dev] PEP 409 - final?

Guido van Rossum guido at python.org
Wed Feb 1 19:01:29 CET 2012


Hm... Reading this draft, I like the idea of using "raise X from
None", but I still have one quibble. It seems the from clause sets
__cause__, and __cause__ can indicate three things: (1) print
__cause__ (explicitly set), (2) print __context__ (default), (3) print
neither (raise X from None). For (1), __cause__ must of course be a
traceback object. The PEP currently proposes to use two special
values: False for (2), None for (3). To me, this has a pretty strong
code smell, and I don't want this pattern to be enshrined in a PEP as
an example for all to follow. (And I also don't like "do as I say,
don't do as I do." :-)

Can we think of a different special value to distinguish between (2)
and (3)? Ideally one that doesn't change the nice "from None" idiom,
which I actually like as a way to spell this.

Sorry that life isn't easier,

--Guido

On Tue, Jan 31, 2012 at 9:14 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Wed, Feb 1, 2012 at 1:57 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> I haven't seen any further discussion here or in the bug tracker.  Below is
>> the latest version of this PEP, now with a section on Language Details.
>>
>> Who makes the final call on this?  Any idea how long that will take? (Not
>> that I'm antsy, or anything... ;)
>
> Guido still has the final say on PEP approvals as BDFL - it's just
> that sometimes he'll tap someone else and say "Your call!" (thus
> making them a BDFOP - Benevolent Dictator for One PEP).
>
> FWIW, I'm personally +1 on the latest version of this.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org



-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list