[issue6849] Tutorial changes

Michael Foord report at bugs.python.org
Sun Sep 6 23:54:39 CEST 2009


Michael Foord <michael at voidspace.org.uk> added the comment:

In addition section 8.3 of the tutorial references the .message
attribute which is now deprecated.

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. One
may also instantiate an exception first before raising it and add any
attributes to it as desired.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6849>
_______________________________________


More information about the Python-bugs-list mailing list