[Python-Dev] PEP 343 question
Guido van Rossum
gvanrossum at gmail.com
Wed Jun 15 17:11:25 CEST 2005
On 6/15/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
>
> In gen.throw(), are all three arguments required? Or do the value and
> traceback Nones need to be listed explicitly?
>
> g.throw(MyException)
>
> or
>
> g.throw(MyException, None, None)
>
> FWIW, I prefer the former. That will make throw() as flexible as the raise
> statement.
I don't particularly care much; the analogy with raise makes sense,
but the PEP carefully only calls it with 3 arguments, and since there
are no use cases outside the PEP, the simpler implementation
(requiring 3 arguments) makes more sense to me.
If you want to implement this part, feel free to make it the way you like!
I consider PEP 343 as accepted at this point as it ever will be;
additional tweaks will be found during implementation.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list