On Thu, Feb 22, 2018 at 6:21 PM, Nick Coghlan <ncogh...@gmail.com> wrote:
> > (I wonder if the discrepancy is due to some internal interface that loses > > the distinction between None and 1 before the decision is made whether to > > use advanced slicing or not. But that's a possible explanation, not an > > excuse.) > > That explanation seems pretty likely to me, as for the data types > implemented in C, we tend to switch to the Py_ssize_t form of slices > pretty early, and that can't represent the None/1 distinction. > > Even for Python level collections, you lose the distinction as soon as > you call slice.indices (as that promises to return 3-tuple of > integers). If this is the case -- backward compatibility issues aside, wouldn't it be very hard to fix? Which means that should be investigated before going to far down the "how much code might this break" route. And certainly before adding a Deprecation Warning. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/