This is Alex Martelli's patch

[ 633870 ] allow any seq assignment to a list slice

plus a very silly little test case of my own.
This commit is contained in:
Michael W. Hudson 2002-11-05 17:38:05 +00:00
parent cc6cc5ddff
commit 5da854fe51
2 changed files with 16 additions and 9 deletions

View file

@ -297,6 +297,10 @@ a *= 0
if a != []:
raise TestFailed, "list inplace repeat"
a = []
a[:] = tuple(range(10))
if a != range(10):
raise TestFailed, "assigning tuple to slice"
print '6.5.3a Additional list operations'
a = [0,1,2,3,4]