On Thu, 2004-02-19 at 19:25, Vinay Sajip wrote: > I propose to make the following change: > def _log(self, level, msg, args, exc_info=None): > # ... > if exc_info: > if type(exc_info) != types.TupleType: > exc_info = sys.exc_info() > record = self.makeRecord(self.name, level, fn, lno, msg, args, > exc_info) > self.handle(record) > > This should allow passing an exception tuple in the exc_info parameter - in > which case, that's used instead of calling sys.exc_info(). It is a slight > change to the semantics but I can't think of any (non-pathological) code > which will break. Can anyone see any problems with this approach? It will work for me. I suppose we could worry about someone have some iterable other than a tuple containing the exc_info, but I think that's even more obscure that my use case of wanting to pass the exc_info tuple. It doesn't make sense to store a heterogenous record in a list. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4