For loop

Boris Ottlewski Boris.Ottlewski at
Wed Mar 15 12:05:39 CET 2000


I got this code snipet: (See the colons!)

for a in i.something():
     for cf in a.somethingelse():

It works in python.exe (shell). How do I use this in embedded python? When a
build a string with this code and do a Py_RunSimpleString() it raises a
syntax error. Is there an alternative syntax? Is the colon someting just
known to the python shell?


Boris Ottlewski - SystemSoft

More information about the Python-list mailing list