Advertisements

Peter Otten wrote:
> I think Exception.args always was supposed to be a tuple. Starting with 2.5
> Python enforces that constraint:
[...]
> http://docs.python.org/tut/node10.html#SECTION0010300000000000000000
> """
> 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.
> """

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!