Mercurial > cpython-lru_cache-weakref
diff Lib/traceback.py @ 52295:7edd143cd4e4 legacy-trunk
revert r70552; wrong fix
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 23 Mar 2009 21:23:30 +0000 |
| parents | f6edc686bde7 |
| children | dca3d672758e |
line wrap: on
line diff
--- a/Lib/traceback.py Mon Mar 23 20:47:59 2009 +0000 +++ b/Lib/traceback.py Mon Mar 23 21:23:30 2009 +0000 @@ -149,7 +149,7 @@ """Format the exception part of a traceback. The arguments are the exception type and value such as given by - sys.exc_info()[0] and sys.exc_info()[1]. The return value is a list of + sys.last_type and sys.last_value. The return value is a list of strings, each ending in a newline. Normally, the list contains a single string; however, for @@ -239,12 +239,12 @@ def print_last(limit=None, file=None): - """ - This is a shorthand for 'print_exception(*sys.exc_info(), limit, file)'. - """ + """This is a shorthand for 'print_exception(sys.last_type, + sys.last_value, sys.last_traceback, limit, file)'.""" if file is None: file = sys.stderr - print_exception(*(sys.exc_info() + (limit, file))) + print_exception(sys.last_type, sys.last_value, sys.last_traceback, + limit, file) def print_stack(f=None, limit=None, file=None):
