problem with exec
Steve Holden
steve at holdenweb.com
Sun Jul 22 09:12:21 EDT 2007
Steven D'Aprano wrote:
> On Sun, 22 Jul 2007 03:23:30 -0700, vedrandekovic wrote:
>
>> Thanks for everything previously, but just to I ask about code
>> indentation,this with { and } doesn't
>> employed, here is my example how can I solve this about code
>> indentation:
>>
>>>>> n=90
>>>>> if n==90:
>> {print "bok kjai ma'}
>> File "<input>", line 2
>> {print "bok kjai ma'}
>> ^
>> SyntaxError: invalid syntax
>
>
> Steve Holden was playing silly games. You can't use { } for indentation.
> You have to use indentation.
>
I wasn't playing silly games at all, and I did prefix that part ofmy
answer with "I'm afraid I don't understand this question". The OP is
writing a program to "translate" a Python-like language that uses
non-English keywords into Python. Since the application is transforming
its input, it could transform braces into indentation. Of course
*Python* doesn't use braces, but the question was how to write
"pseudo-Python" without using indentation to indicate grouping.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------
More information about the Python-list
mailing list