[Python-3000] removing exception .args (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jul 22 03:46:24 CEST 2007


Andrew Dalke wrote:

However, for backwards compatibility, the args attribute

contains only a 2-tuple of the first two constructor arguments.

This is a good reason for having named attributes instead of a tuple -- it's extensible without requiring these sorts of hacks.

As for the C function problem -- are these functions instantiating some known exception class? If so, why can't that class be given an init that accepts the appropriate arguments positionally and stores them as attributes (or passes them on as keywords args as per my earlier suggestion)?

-- Greg



More information about the Python-3000 mailing list