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

[Python-Dev] Ranges

[Python-Dev] Ranges [Python-Dev] RangesMoshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Thu, 13 Jul 2000 10:46:31 +0300 (IDT)
On Wed, 12 Jul 2000, Ka-Ping Yee wrote:

> I believe the two possibilities were
> 
>     __getitem__ gets either an index or a special slice object
>     __getslice__ is deprecated (when missing, __getitem__ gets the slice args)
> 
> and
> 
>     __getitem__ always gets an index
>     __getslice__ gets three arguments, all optional, defaulting to None
> 
> The latter isn't backward-compatible, but it makes a heckuva lot
> more sense.

Right. I'd be +1 on the latter if we didn't have to be backwards
compatible. OTOH: How many people do you know who deal with slices in
__getitem__, besides the numpy people?

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez




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