Message141033
| Author |
ezio.melotti |
| Recipients |
eric.araujo, ezio.melotti, jcea, max-alleged, petri.lehtinen, rhettinger, terry.reedy, xuanji |
| Date |
2011年07月24日.02:05:04 |
| SpamBayes Score |
3.0980277e-06 |
| Marked as misclassified |
No |
| Message-id |
<1311473105.36.0.580086293798.issue12170@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> When an integer out of range(0, 256) is passed as the first argument,
> should we raise a ValueError or a TypeError?
ValueError = Inappropriate argument value (of correct type).
TypeError = Inappropriate argument type.
> Currently, a ValueError raised, but this may be bad for index and
> rindex, as they raise a ValueError when the substring or byte is not found.
Then the users should check if the value is in range(256) before passing it to (r)index. |
|