Message152592
| Author |
mhammond |
| Recipients |
mhammond |
| Date |
2012年02月04日.05:31:31 |
| SpamBayes Score |
1.6854926e-09 |
| Marked as misclassified |
No |
| Message-id |
<1328333493.54.0.112859472866.issue13938@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
test_types.py converts "types.StringTypes" to "str" - but types.StringTypes is a tuple, so expressions like "type(x) in type.StringTypes" fails after conversion with "TypeError: argument of type 'type' is not iterable"
Attaching a fix and test.
Note that the fixer still seems "strange" after this fix - types.StringType gets converted to "bytes" but types.StringTypes uses str. This means the expression "type.StringType in type.StringTypes" evaluates to True in 2.x but False once converted - however, that should probably be tackled in a different bug - the fact the expression now causes a TypeError once converted is more blatantly wrong and the focus of this bug. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月04日 05:31:33 | mhammond | set | recipients:
+ mhammond |
| 2012年02月04日 05:31:33 | mhammond | set | messageid: <1328333493.54.0.112859472866.issue13938@psf.upfronthosting.co.za> |
| 2012年02月04日 05:31:32 | mhammond | link | issue13938 messages |
| 2012年02月04日 05:31:32 | mhammond | create |
|