Matlab vs Python (was RE: Discussion: Introducing new operators for matrix computation)

John Lull lull at acm.org
Thu Jul 20 08:53:02 EDT 2000


At the dawn of the third millenium (by the common reckoning), Paul
Prescod <paul at prescod.net> wrote (with possible deletions):

> John Lull wrote:
> > 
> > ...
> > 
> >    a..newOp..(b..otherOp..c)
> 
> I really like the fact that the operator uses a word instead of a
> cryptic symbol, but I can't understand why anyone would prefer the above
> to:
> 
> a.newOp(b.otherOp(c))

It has no advantage on a simple expression like this, assuming a and b
provide newOp() and otherOp() respectively.  The advantage only shows
up on complex expressions, where the functional notation can make it
much more difficult to read, or in a case where b.__otherOp__()
provides __rnewOp__().



More information about the Python-list mailing list