Message264023
| Author |
r.david.murray |
| Recipients |
anish.shah, demian.brecht, luiz.poleto, martin.panter, orsenthil, r.david.murray, ztane |
| Date |
2016年04月22日.15:43:50 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1461339830.57.0.30914294753.issue22234@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|