New submission from Christoph Zwerschke <c...@online.de>:

The Python 2.6.2 tutorial says at the end of secton 8.3
(http://docs.python.org/tutorial/errors.html#handling-exceptions):

"But use of .args is discouraged. Instead, the preferred use is to pass 
a single argument to an exception (which can be a tuple if multiple 
arguments are needed) and have it bound to the message attribute."

It seems this is not true any more, the idea has been retracted so that 
it's now the other way around again: .args can still be used, 
but .message is deprecated (see http://www.python.org/dev/peps/pep-
0352/#retracted-ideas).

The examples classes in section 8.5 of the Tutorial, using the .message 
attribute should be also adapted because they raise a 
DeprecationWarning in Python 2.6.2.

----------
assignee: georg.brandl
components: Documentation
messages: 91937
nosy: cito, georg.brandl
severity: normal
status: open
title: Python 2.6 tutorial still recommends using Exception.message attribute
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6777>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to