Message112977
Reading PEP 0249 I can see Gerhard is correct, this patch would violate the PEP.
I think that the PEP is slightly flawed in that users are encouraged to raise exceptions called "Warning". IMHO a Warning is never an exceptional condition and should be notified by the warnings framework.
This obviously confused the authors of MySQLdb, who do indeed warn() their Warning classes rather than raise() them, and it is very useful to be able to filter them.
To obey the letter of the PEP the authors of the MySQLdb interface multiply inherit their Warning class from exceptions.StandardError and exceptions.Warning.
I could make a patch for sqlite3 to do this if anyone thinks it would be useful. |
|
Date |
User |
Action |
Args |
2010-08-05 13:18:44 | ncw | set | recipients:
+ ncw, ghaering, pitrou, eric.araujo |
2010-08-05 13:18:44 | ncw | set | messageid: <1281014324.79.0.984141097147.issue9510@psf.upfronthosting.co.za> |
2010-08-05 13:18:43 | ncw | link | issue9510 messages |
2010-08-05 13:18:43 | ncw | create | |
|