[Python-3000] removing exception .args (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jul 22 03:46:24 CEST 2007
- Previous message: [Python-3000] removing exception .args
- Next message: [Python-3000] pyexpat: returns_unicode str/unicode branch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] removing exception .args
- Next message: [Python-3000] pyexpat: returns_unicode str/unicode branch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]