On Mar 21, 8:38 am, "dmitrey" <[EMAIL PROTECTED]> wrote:
> Hi all,
> I looked to the PEPs & didn't find a proposition to remove brackets &
> commas for to make Python func call syntax caml- or tcl- like: instead
> of
> result = myfun(param1, myfun2(param5, param8), param3)
> just make possible using
> result =  myfun param1 (myfun2 param5 param8) param3
>
> it would reduce length of code lines and make them more readable, + no
> needs to write annoing charecters.
> Maybe it will require more work than I suppose, for example handling
> of things like
> result = myfun(param1, myfun2(param5, param8), param3=15, param4=200)
> to
> result =  myfun param1 (myfun2 param5 param8) param3=15 param4=200 #so
> it needs some more efforts to decode by compiler
>
> but anyway I think it worth.
> + it will not yield incompabilities with previous Python versions.
>
> WBR, D.

In my opinion, it is much less readable.  That may be due to my
experiences with TCL, BASH-scripting, with C, C++, and Python.  The
parenthesis make it very obvious that a function call is going on, and
mirrors the mathematical notations that denote using a function.

With touch-typing on an American keyboard, the ()'s are not really any
more annoying than any of the various top-row digits.  I personally
find the backslash character (\) to be far more annoying, as it can
have one of several locations depending on the keyboard style.  (Most
sanely put it above the "Enter" key.)

As others have pointed out, the code that you presented really isn't
all that much shorter.  Short code isn't really what Python's about.
Perl has many ways to write very short, incomprehensible code.

A further ambiguity to consider:

result = func1

Is the name "result" bound to the function func1?  Or is func1 called,
and its result is bound to the name "result"?

Good luck with your PEP.

  --Jason

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to