◐ Shell
clean mode source ↗

Message 264023 - Python tracker

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.