Issue 887042: 2.3.3 str & list still use getslice / setslice (original) (raw)

Created on 2004-01-29 15:47 by oodoo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg19849 - (view) Author: ibo (oodoo) Date: 2004-01-29 15:47
Python 2.3.3 (#1, Jan 13 2004, 17:45:56) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 str and list still use __getslice__ / __setslice__ for the binary form foo = mystr[1:2] mystr[1:2] = foo instead of __getitem__ / __setitem__ with slice objects.
msg19850 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2004-02-03 02:03
Logged In: YES user_id=593130 This only strikes me as a bug if use of *item is specified somewhere so that people subclassing builtin seqs know which methods to override. Is it? Are tuples different or just not checked?
msg19851 - (view) Author: ibo (oodoo) Date: 2004-02-03 21:04
Logged In: YES user_id=723141 Jep, I noticed it while subclassing and overriding the operators for slicing. It's odd to deprecate a feature, and force the programmer to use it anyway if he wants to sublcass existing types. Is there an explicit typename for tuples?
msg55199 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 20:18
This won't change until Py3k, where the old __fooslice__ methods will be gone.
History
Date User Action Args
2022-04-11 14:56:02 admin set github: 39879
2007-08-23 20🔞02 georg.brandl set status: open -> closedresolution: latermessages: + nosy: + georg.brandl
2004-01-29 15:47:04 oodoo create