Message120483
| Author |
shashank |
| Recipients |
ned.deily, rhettinger, shashank, terry.reedy |
| Date |
2010年11月05日.10:25:29 |
| SpamBayes Score |
2.0244675e-08 |
| Marked as misclassified |
No |
| Message-id |
<1288952731.18.0.627612454683.issue10323@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
@Raymond: I don't have a particular use case where I had a problem with this behavior. I came across this "problem" when looking at this issue http://bugs.python.org/issue6305.
An important problem that can happen with this behavior is that it does extra work that is not needed. Consider the case (it appears in Lib/test/test_itertools.py):
islice(count(), 1, 10, maxsize)
where maxsize is MAX_Py_ssize_t
Current implementation goes all the way up to maxsize when it should have just stopped at 10.
You are probably right in saying that the caller can make sure that the parameters are such that such cases don't arise but I would still like to see python doing the best possible thing as far as possible. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年11月05日 10:25:31 | shashank | set | recipients:
+ shashank, rhettinger, terry.reedy, ned.deily |
| 2010年11月05日 10:25:31 | shashank | set | messageid: <1288952731.18.0.627612454683.issue10323@psf.upfronthosting.co.za> |
| 2010年11月05日 10:25:30 | shashank | link | issue10323 messages |
| 2010年11月05日 10:25:29 | shashank | create |
|