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-July/005976.html below:

[Python-Dev] non-integer arguments to simple slices in 1.6?

[Python-Dev] non-integer arguments to simple slices in 1.6?Gordon McMillan gmcm@hypernet.com
Mon, 10 Jul 2000 10:41:37 -0400
[Guido]
> I got the following email from Scott Johnston which suggests an
> interesting idea (for 2.0, of course, as that's what we're all
> working on now).  basically, Scott proposes to deprecate
> __getslice__ (and its friends, __setslice__ and __delslice__) in
> favor of passing the slice arguments unadorned to __getitem__  if
> __getslice__ is not defined.
> 
> On the surface, this seems reasonable to me, except that it
> doesn't help for extension classes...

We have a problem here, but I think it's in the fact that 
currently certain slices end up in __getitem__ and some in 
__getslice__.

IOW, I think that __getitem__ should return an item, and this 
fix (while clever) just compounds a mistake.


- Gordon



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