[Python-Dev] Re: PEP 282 comments

Trent Mick trentm@ActiveState.com
Thu, 21 Mar 2002 19:16:49 -0800


[Jeremy Hylton wrote]
> >>>>> "VS" == Vinay Sajip <vinay_sajip@red-dove.com> writes:
> 
>   VS> I like this. I prefer the name "exc_info" (rather than "exc")
>   VS> for the key, as it is clearer that the result of sys.exc_info(),
>   VS> or equivalent, is being passed. How about the following? The
>   VS> kwargs is searched for "exc_info", and if found it is copied to
>   VS> the LogRecord [and removed from kwargs]. The kwargs dict is then
>   VS> bound to a "user_info" attribute of the LogRecord.
> 
> Why do you need **kwargs at all?  Can't the interface specify the
> complete set of optional arguments explicitly?

If, as I said, we want to keep the '*args' argument, how do we explicitly
specify an 'exc_info' argument?

    def info(self, msg, *args, exc_info=None):
                                      ^------- SyntaxError

Trent


-- 
Trent Mick
TrentM@ActiveState.com