Greg Ewing [EMAIL PROTECTED] wrote:
Josiah Carlson wrote:
One major problem with this is that except for function calls, * is the
multiplication operator, which operates on two arguments. *foo is an
operation on a single argument, and without parenthesis, would be
ambiguously parsed.
On 4/18/06, Greg Ewing [EMAIL PROTECTED] wrote:
No, it wouldn't. There's no problem in giving an operator
different unary and binary meanings; '-' already does
that.
However unlike -, there is a two character ** operator, so while x--y
is the same as x - - y, x**y would not be the same as x *
DISCLAIMERi'm not going to defend and fight for this idea too much. i only bringit up because it bothers me. i'm sure some people here would kill me for
even suggesting this, and i really don't want to be killed right now,so i bring it up as something you should think about. nothing
tomer filiba [EMAIL PROTECTED] wrote:
isn't the latter more elegant?
According to my experience with Python, as well as my interpretations of
the zens, no. -1
and the zen supports my point:
(*) Beautiful is better than ugly -- f(*(args + (7,))) is ugly
But explicit is better than implicit,
Josiah Carlson wrote:
One major problem with this is that except for function calls, * is the
multiplication operator, which operates on two arguments. *foo is an
operation on a single argument, and without parenthesis, would be
ambiguously parsed.
No, it wouldn't. There's no problem in