00001 # This file is Copyright 2010 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 235 00015 # 00016 00017 import list 00018 00019 00020 l = [] 00021 for i in xrange(3): 00022 print i 00023 list.append(l, i) 00024 00025 assert l == range(3) 00026 00027 # Results in an AssertionError because the generator's StopIteration is 00028 # not caught; there is no SETUP_LOOP bytecode for this code 00029 # [x/2. for x in xrange(10) if x%2 == 0]