[Python-ideas] Default arguments in Python - the return - running out of ideas but...

spir denis.spir at free.fr
Thu May 14 08:50:42 CEST 2009


Le Wed, 13 May 2009 12:30:04 -0700,
Scott David Daniels <Scott.Daniels at Acm.Org> s'exprima ainsi:

> spir wrote:
> > My opinion on this is you're basically right. Even 'print' (for py<3.0)
> > could be an identifier you could use in an assignment (or in any value
> > expression), I guess, for parse patterns are different: print_statement :
> > "print" expression assignment      : name '=' expression So you can
> > safely have "print" as name, or inside an expression. Even "print print"
> > should work !
> 
> But you would not want
>      print print
> and
>      print(print)
> to have two different meanings.
> In Python, extra parens are fair around expressions,
> and print(print) is clearly a function call.
> 
You're right ;-)

Denis
------
la vita e estrany



More information about the Python-ideas mailing list