is it possible to remove the ':' symbol in the end of lines starting with 'if', 'while' etc?

openopt at ukr.net openopt at ukr.net
Thu Feb 22 11:37:11 EST 2007


> Think on the bright side:
>
> you have to type ":" at the beginning of loop and conditional blocks,
> but you don't have to type "end"  at the end... you are still saving
> two strokes...
> ;-))

No, there no profits:
instead of 'end' I must type <shift>, ':' and backspace in the end of
block - so 3 keypress are used, same as 'end'
Of course Python is much more better in syntax vs C/C++ but I would
prefere tcl-style or caml-style
x = fun arg1 arg2 ... argn
however, in tcl annoing things are 'set' and 'expr'
and in ocaml '<-' and 'let x = ... in' - too many keypress instead of
'='
but their func calls still is better then fun(arg1, arg2, ..., argn)
and help _something_  or which _something_ in MATLAB is much more
better then help(_something_) in Python
the only bad thing in MATLAB (+absence of x = fun arg1 arg2 ... argn
call) is indexing arrays by () instead of [] - holding shift key
dozens times per day is very unconvinient.
And in Python vs MATLAB is very unconvinient arrays creation.

I'm very afraid of proposition that I noticed at
http://wiki.python.org/moin/SummerOfCode
Base multidimensional array type for Python core
Student: KarolLangner
Mentor: Travis E. Oliphant
I don't know about anyone mentioned but I'm not sure this is a good
idea to hire ordinary student for such important thing.
And writing 'dimarray(...)' dozens times per day is much more bad than
x = matrix('...'), x = array([...]) or, of course, MATLAB-style x = [1
2 3]
I guess it should 10 times more think about the array and make it once
and forever - Python already has some array-related classes and all
with syntax much more bad than MATLAB. I guess there should be only 2
types: one for storing data in convinient way without reallocating
(something like C++ STL vector<>) and one for quick calculations
(something like C++ valarray).
WBR, Dmitrey.




More information about the Python-list mailing list