Python Rocks! - get rid of colons
Cedric Adjih
adjih at crepuscule.com
Fri Jan 21 12:05:25 EST 2000
tye4 <tye4 at yahoo.com> wrote:
> Sami Hangaslammi <shang.remove_edu at st.jyu.fi.edu> wrote in message
> news:867t9d$aoi$1 at mordred.cc.jyu.fi...
>> > I intend to modify the language's syntax to add
>> > 'end' delimiters for the blocks.
>>
>> Wouldn't it be better (and easier) to write a script that converts
>> between .py and .pye (python with end delimeters) scripts. This would
>> allow you to both use existing Python libraries and distribute modules
>> you have made to others.
>>
>> --
>> Sami Hangaslammi
>> shang (at) st (dot) jyu (dot) fi
>>
>>
> Brilliant idea. Thanks. That's a lot less work than I had planned.
> -tye4
There is already one in Tools/scripts/pident.py that does something
similar.
Alternatively you could do something like:
endFor=0 ; endfor=0 ; end=0 ; end_for=0
And write code such as follows to your heart content:
for i in range(0,100):
xxxx
endfor
- or
for i in range(0,100):
xxxx
endFor
- or
for i in range(0,100):
xxxx
end_for
- or
for i in range(0,100):
xxxx
end
-
same applies with endwhile, enddef, endclass, endtry, ...
-- Cedric
More information about the Python-list
mailing list