[Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)
Brett Cannon
brett at python.org
Tue Jan 23 00:08:44 CET 2007
On 1/22/07, Collin Winter <collinw at gmail.com> wrote:
> On 1/12/07, Steven Bethard <steven.bethard at gmail.com> wrote:
> > On 1/12/07, Barry Warsaw <barry at python.org> wrote:
> > > It's worth spending time thinking about how we can help ease the
> > > transition for each. There may be more thing too. I wonder if it
> > > doesn't make sense for all 3xxx PEPs to include a discussion section
> > > on porting.
> >
> > Yeah, when this was talked about last time, I wrote PEP 3002 which
> > requests exactly this:
> >
> > http://www.python.org/dev/peps/pep-3002/
> >
> > It basically proposes that all backwards-incompatible changes be
> > discussed in a PEP somewhere, and that code like Anthony's be added to
> > 2.X to ease the transition.
>
> Attached are drafts of the PEP 3002-compliant PEPs concerning the
> changes to raise and except statements that have been discussed on
> python-3000.
>
> Any suggestions/corrections/additions would be much appreciated.
>
For the exception PEP:
"In addition, Python 3 will introduce a further incompatibility."
You have not even mentioned a Py3K incompatibility yet so this
statement is awkward.
"This PEP intends to resolve this issue by adding a
cleanup semantic to ``except`` clauses of the form ``except E as N``".
This sentence is in reference to the cycle created with exceptions
holding a reference to the traceback. Problem is the above gives
absolutely no indication how a syntactic change is going to help with
cyclic garbage collection.
---------
For the raise PEP:
"consildation"
It's "consolidation".
"The ease of this translation allows a further simplification of the
language by removing the need for the ``raise E, V, T`` form.".
At this point in the Rationale you have not explicitly stated that
``raise E(V)`` is going to be the only way to raise an exception.
You might want to also want to mention if you are or are not going to
remove sys.exc_info . If you are then you need to state that and
mention that all places where three arguments for exceptions is
expected will need to be changed. Might also not hurt to reference
any other exception information functions that are slated to go in PEP
3100.
--------
Thanks for doing this, Collin!
-Brett
More information about the Python-3000
mailing list