A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-February/002189.html below:

[Python-Dev] non-integer slice indices?

[Python-Dev] non-integer slice indices? [Python-Dev] non-integer slice indices?Skip Montanaro skip@mojam.com (Skip Montanaro)
Fri, 11 Feb 2000 14:42:44 -0600
Viorel Preoteasa asked on python-help today about supporting slices with
non-integer indexes, e.g.:

    foo['a':'abc'] = some_sequence

Currently the Python interpreter (in the slice_index function of ceval.c)
enforces integer slice indices.  I won't pretend to provide motivation for
non-integral slice indices.  Instead, I've CC'd Viorel and will let him
chime in if he feels the need.  It does seem to me that if the __setslice__
programmer is willing to do the type checking and provide the semantics of
"from X to Y" for aribtrary X and Y that the interpreter should let
non-integer indices pass.

Skip Montanaro | http://www.mojam.com/
skip@mojam.com | http://www.musi-cal.com/
"Languages that change by catering to the tastes of non-users tend not to do
so well." - Doug Landauer



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4