Message92708
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. |
|
Date |
User |
Action |
Args |
2009-09-16 19:20:23 | georg.brandl | set | recipients:
+ georg.brandl, loewis, barry, brett.cannon, dgrisby, exarkun, ezio.melotti, ivank, aisaac |
2009-09-16 19:20:23 | georg.brandl | set | messageid: <1253128823.21.0.655567178747.issue6844@psf.upfronthosting.co.za> |
2009-09-16 19:20:22 | georg.brandl | link | issue6844 messages |
2009-09-16 19:20:21 | georg.brandl | create | |
|