Python 2.5 fails where 2.4 works when running external program

Heikki Toivonen heikki at osafoundation.org
Fri Mar 30 03:36:00 EDT 2007


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. 
> """

Excellent, thank you!

-- 
  Heikki Toivonen



More information about the Python-list mailing list