Message264023
I just posted about this on the mentors list, where someone brought this issue up with a question about our policy on type checking. The short version is the better (preserves duck-typing) and more backward compatibile fix is to change the test to be
x != ''
That will result in an attribute error on 'decode' for values of the incorrect type.
But even that should go through a deperecation cycle, since there may be working programs depending on the current behavior. It's worth fixing, though, because of the error propogation you report. I also suggested a rewrite of _check_args to get a better error message that would indeed be a type error, and I'm anticipating someone from the mentors list will turn that into a patch here. |
|
Date |
User |
Action |
Args |
2016-04-22 15:43:50 | r.david.murray | set | recipients:
+ r.david.murray, orsenthil, martin.panter, ztane, demian.brecht, luiz.poleto, anish.shah |
2016-04-22 15:43:50 | r.david.murray | set | messageid: <1461339830.57.0.30914294753.issue22234@psf.upfronthosting.co.za> |
2016-04-22 15:43:50 | r.david.murray | link | issue22234 messages |
2016-04-22 15:43:50 | r.david.murray | create | |
|