This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients aisaac, barry, brett.cannon, dgrisby, exarkun, ezio.melotti, georg.brandl, ivank, loewis
Date 2009-09-16.19:20:21
SpamBayes Score 4.001012e-05
Marked as misclassified No
Message-id <1253128823.21.0.655567178747.issue6844@psf.upfronthosting.co.za>
In-reply-to
Content
The patch leads to crashes with all the exceptions that have their own
structs; since they are derived from BaseException they must start with
the same binary layout as PyBaseExceptionObject (pointers to any
exception will be cast to PyBaseExceptionObject).

This also shows one way in which this change can mess up third-party
extensions (though I don't know if anybody does that): if some extension
created new exception classes doing it the way we do, e.g. for SyntaxError.

However, I have a different suggestion: we could put a user-set
"message" in the __dict__.  The getter would then check for that first
and only warn if it falls back to self->message. See attached patch.
History
Date User Action Args
2009-09-16 19:20:23georg.brandlsetrecipients: + georg.brandl, loewis, barry, brett.cannon, dgrisby, exarkun, ezio.melotti, ivank, aisaac
2009-09-16 19:20:23georg.brandlsetmessageid: <1253128823.21.0.655567178747.issue6844@psf.upfronthosting.co.za>
2009-09-16 19:20:22georg.brandllinkissue6844 messages
2009-09-16 19:20:21georg.brandlcreate