[Python-Dev] PEP 352 Transition Plan (original) (raw)

Raymond Hettinger raymond.hettinger at verizon.net
Fri Oct 28 22:44:53 CEST 2005


> Why would a > release allow catching something that cannot be raised? I must be > missing something here.

So conforming code can catch exceptions raised by not-yet conforming code.

That makes sense.

What was the rationale for pushing the deprecation of getitem and args back to Py2.8? Is the there a disadvantage for doing it earlier? On the flip side, is there any reason it has to be done at all prior to Py3.0? That change seems orthogonal to the rest of the proposal and has its own pluses and minuses (simplification on the plus-side and code-breakage on the minus-side).

FWIW, the args tuple does have a legitimate use case as one solution to the problem of exception chaining (keeping the old info intact, but adding new info as an extra field):

try: raise TypeError('inner detail') except TypeError, e: args = e.args + ('outer context',) raise TypeError(*args)

Raymond



More information about the Python-Dev mailing list