why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

Piet van Oostrum piet at cs.uu.nl
Wed Mar 21 16:54:59 CET 2007


>>>>> "dmitrey" <openopt at ukr.net> (d) wrote:

>d> I think it should result
>d> result = func1(func2, arg)
>d> if you want
>d> result = func1(func2(arg))
>d> you should use
>d> result = func1 (func2 arg)
>d> if
>d> ... = word1 word2 word3 ...
>d> then only word "word1" should be call to func "word1" with parameters
>d> word2, word3 etc

That depends whether you want function application to be left-associative
or right-associative. For example, in haskell it is left associative which
is the more obvious choice because it has currying.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list