#NEWLINE# def test_extendedslicing( self ) : #NEWLINE# #INDENT# a = self . type2test ( [ 0 , 1 , 2 , 3 , 4 ] ) #NEWLINE# del a [ : : 2 ] #NEWLINE# self . assertEqual ( a , self . type2test ( [ 1 , 3 ] ) ) #NEWLINE# a = self . type2test ( range ( 5 ) ) #NEWLINE# del a [ 1 : : 2 ] #NEWLINE# self . assertEqual ( a , self . type2test ( [ 0 , 2 , 4 ] ) ) #NEWLINE# a = self . type2test ( range ( 5 ) ) #NEWLINE# del a [ 1 : : ( - 2 ) ] #NEWLINE# self . assertEqual ( a , self . type2test ( [ 0 , 2 , 3 , 4 ] ) ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# del a [ : : 1000 ] #NEWLINE# self . assertEqual ( a , self . type2test ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] ) ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# a [ : : 2 ] = ( [ ( - 1 ) ] * 5 ) #NEWLINE# self . assertEqual ( a , self . type2test ( [ ( - 1 ) , 1 , ( - 1 ) , 3 , ( - 1 ) , 5 , ( - 1 ) , 7 , ( - 1 ) , 9 ] ) ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# a [ : : ( - 4 ) ] = ( [ 10 ] * 3 ) #NEWLINE# self . assertEqual ( a , self . type2test ( [ 0 , 10 , 2 , 3 , 4 , 10 , 6 , 7 , 8 , 10 ] ) ) #NEWLINE# a = self . type2test ( range ( 4 ) ) #NEWLINE# a [ : : ( - 1 ) ] = a #NEWLINE# self . assertEqual ( a , self . type2test ( [ 3 , 2 , 1 , 0 ] ) ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# b = a [ : ] #NEWLINE# c = a [ : ] #NEWLINE# a [ 2 : 3 ] = self . type2test ( [ 'two' , 'elements' ] ) #NEWLINE# b [ slice ( 2 , 3 ) ] = self . type2test ( [ 'two' , 'elements' ] ) #NEWLINE# c [ 2 : 3 ] = self . type2test ( [ 'two' , 'elements' ] ) #NEWLINE# self . assertEqual ( a , b ) #NEWLINE# self . assertEqual ( a , c ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# a [ : : 2 ] = tuple ( range ( 5 ) ) #NEWLINE# self . assertEqual ( a , self . type2test ( [ 0 , 1 , 1 , 3 , 2 , 5 , 3 , 7 , 4 , 9 ] ) ) #NEWLINE# a = self . type2test ( range ( 10 ) ) #NEWLINE# del a [ 9 : : ( 1 << 333 ) ]