mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
cc6cc5ddff
commit
5da854fe51
2 changed files with 16 additions and 9 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue