Message229857
| Author |
Paul.Ianas |
| Recipients |
Paul.Ianas, rhettinger, tim.peters |
| Date |
2014年10月23日.06:52:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1414047157.03.0.0420353515813.issue22683@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Sure, it is your call. As said, this is rather an enhancement.
Still, if I were to decide, I would chose:
1. not to break the API <=> raise IndexError instead of ValueError in case hi is invalid.
2. to protect against illegal values: as said, if hi < 0 bisect_* always returns 0 (whatever the searched value).
3. I would implement a single _range_check(_len, lo, hi) method to do this logic (DRY).
That being said, from my point of view this ticket can be closed. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年10月23日 06:52:37 | Paul.Ianas | set | recipients:
+ Paul.Ianas, tim.peters, rhettinger |
| 2014年10月23日 06:52:37 | Paul.Ianas | set | messageid: <1414047157.03.0.0420353515813.issue22683@psf.upfronthosting.co.za> |
| 2014年10月23日 06:52:37 | Paul.Ianas | link | issue22683 messages |
| 2014年10月23日 06:52:36 | Paul.Ianas | create |
|