David Isaac: >I would like to be able to define a loop statement >(nevermind why) so that I can write something like > >loop 10: > do_something > >instead of > >for i in range(10): > do_something > >Possible? If so, how?
Yes. By implementing a compiler or an interpreter for your programming language. Or a preprocessor that converts your language to Python, or some other suitable intermediate language. Or a programmer, that converts your pseudocode and some coffee to the desired algorithm :-) -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list