[Patches] [ python-Patches-633870 ] allow any seq assignment to a list slice

noreply@sourceforge.net noreply@sourceforge.net
Tue, 05 Nov 2002 07:59:46 -0800


Patches item #633870, was opened at 2002-11-05 16:59
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=633870&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Martelli (aleax)
Assigned to: Nobody/Anonymous (nobody)
Summary: allow any seq assignment to a list slice

Initial Comment:
as suggested by Michael Hudson in his comp.lang.python 
post of Tue, 5 Nov 2002 14:03:46 GMT, Subject "Re: List 
slice assignment and custom sequences", message id 
<m2k7jsm7u7.fsf@python.net> .  The patch affects 
Objects/listobject.c: with no performance impact when the 
RHS of an assignment to a list slice is a list, the patch also 
allows the RHS to be any other sequence object acceptable 
to PySequence_Fast -- just like such general sequences are 
acceptable today e.g. as arguments to the extend method, 
so the patch makes them acceptable as RHS in assignment 
to list slices.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=633870&group_id=5470