<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 22, 2018 at 6:21 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> (I wonder if the discrepancy is due to some internal interface that loses<br>
> the distinction between None and 1 before the decision is made whether to<br>
> use advanced slicing or not. But that's a possible explanation, not an<br>
> excuse.)<br>
<br>
</span>That explanation seems pretty likely to me, as for the data types<br>
implemented in C, we tend to switch to the Py_ssize_t form of slices<br>
pretty early, and that can't represent the None/1 distinction.<br>
<br>
Even for Python level collections, you lose the distinction as soon as<br>
you call slice.indices (as that promises to return 3-tuple of<br>
integers).</blockquote><div><br></div><div>If this is the case -- backward compatibility issues aside, wouldn't it be very hard to fix?</div><div><br></div><div>Which means that should be investigated before going to far down the "how much code might this break" route.</div><div><br></div><div>And certainly before adding a Deprecation Warning.</div><div><br></div><div>-CHB</div><div> </div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>