00001 # This file is Copyright 2009 Dean Hall. 00002 # 00003 # This file is part of the Python-on-a-Chip program. 00004 # Python-on-a-Chip is free software: you can redistribute it and/or modify 00005 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. 00006 # 00007 # Python-on-a-Chip is distributed in the hope that it will be useful, 00008 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00010 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 00011 # is seen in the file COPYING up one directory from this. 00012 00013 # 00014 # System Test 236 00015 # Fix SLICE_0 00016 # 00017 00018 s1 = "test" 00019 s2 = s1[:] 00020 assert s1 == s2 00021 assert id(s1) == id(s2) 00022 00023 t1 = (1,2,3) 00024 t2 = t1[:] 00025 assert t1 == t2 00026 assert id(t1) == id(t2) 00027 00028 l1 = [1,2,3] 00029 l2 = l1[:] 00030 assert l1 == l2 00031 assert id(l1) != id(l2)