[Python-Dev] Re: PEP 282 comments (original) (raw)

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


[Jeremy Hylton wrote]

>>>>> "VS" == Vinay Sajip <vinaysajip@red-dove.com> writes:

VS> I like this. I prefer the name "excinfo" (rather than "exc") VS> for the key, as it is clearer that the result of sys.excinfo(), VS> or equivalent, is being passed. How about the following? The VS> kwargs is searched for "excinfo", and if found it is copied to VS> the LogRecord [and removed from kwargs]. The kwargs dict is then VS> bound to a "userinfo" 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