how to iterate over sequence and non-sequence ?

stef mientki stef.mientki at gmail.com
Sat Oct 20 12:09:02 CEST 2007


<snip>
>> def user_program():
>>   x = 5    ; _debug(2)
>>   global x,i
>>   _debug (3)
>>   for i in xrange(10):
>>       _debug (3)
>>       x = x + 1    ; _debug (4)
>>     
>
> You do know that Python exposes all of it's compilation / AST / whatever 
> machinery, don't you ? IOW, you can take a textual program, compile it 
> to a code object, play with the AST, add debug hooks, etc... Perhaps you 
> should spend a little more time studying the modules index ?
>   
thanks Bruno,
but you're talking about terminology I don't know:
compilation / AST / IOW / module index ???

But to be honest it's not my main goal.
My goal is to write a functional simulator.
You can compare it with a little travelling,
I want to go from A to B.
Normally I'ld travel by bus or train,
but in this case there isn't going a bus to B.
So in this case I take a car,
ask someone how to start it,
and drive to B.

But anyway thanks very much for this and other answers.
cheers,
Stef Mientki





More information about the Python-list mailing list