[Python-3000] How far to go with cleaning up exceptions (original) (raw)
Brett Cannon brett at python.org
Sat Mar 3 03:22:08 CET 2007
- Previous message: [Python-3000] How far to go with cleaning up exceptions
- Next message: [Python-3000] Draft PEP for New IO system
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3/2/07, Nick Coghlan <ncoghlan at gmail.com> wrote:
Brett Cannon wrote: > I think the slice removal is easy. But getting rid of 'args' and > making BaseException's constructor only take a single argument is not > painless. But a warning should help get this done in a reasonable > fashion.
The exception slicing is the only thing I ever thought was particularly odd - the rest of the current exception API has never really bothered me. All I would suggest doing is to move the BaseException constructor closer to PEP 352 by always setting the message attribute to str(args[0]) rather than only doing it when the constructor is called with a single argument.
If 'args' is not removed that will definitely happen as that came out to be an odd special-casing.
-Brett
- Previous message: [Python-3000] How far to go with cleaning up exceptions
- Next message: [Python-3000] Draft PEP for New IO system
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]