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
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.
Christopher Barker, Ph.D.
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
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/