diff options
author | Michael W. Hudson <mwh@python.net> | 2002-11-05 17:38:05 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-11-05 17:38:05 (GMT) |
commit | 5da854fe51ed76a236a44f82e6ee553a0ad9c51d (patch) | |
tree | e547e3e1a235ee2836d72ad712658691d601d7c9 /Lib/test | |
parent | cc6cc5ddff06050e430d2d08a594ca8781bb7791 (diff) | |
download | cpython-5da854fe51ed76a236a44f82e6ee553a0ad9c51d.zip cpython-5da854fe51ed76a236a44f82e6ee553a0ad9c51d.tar.gz cpython-5da854fe51ed76a236a44f82e6ee553a0ad9c51d.tar.bz2 |
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.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_types.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index a38eb7f..9777e83 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -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] |