Message141033
> 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. |
|
Date |
User |
Action |
Args |
2011-07-24 02:05:05 | ezio.melotti | set | recipients:
+ ezio.melotti, rhettinger, terry.reedy, jcea, eric.araujo, xuanji, max-alleged, petri.lehtinen |
2011-07-24 02:05:05 | ezio.melotti | set | messageid: <1311473105.36.0.580086293798.issue12170@psf.upfronthosting.co.za> |
2011-07-24 02:05:04 | ezio.melotti | link | issue12170 messages |
2011-07-24 02:05:04 | ezio.melotti | create | |
|