Operators for everything (was Re: Operators for matrix)
Bill Whiten
W.Whiten at mailbox.uq.edu.au
Fri Jul 21 18:04:49 EDT 2000
In article <39789C90.B1212E48 at prescod.net>, Paul Prescod
<paul at prescod.net> wrote:
> Michael Hudson wrote:
> >
> > The semantics would be:
> >
> > a @<id> b === <id>(a,b)
> >
> > for any valid identifier <id>.
> >
> > There are still precedence issues, but I think they can be ignored
> > (make everything of this from the same (low) precedence & left
> > asssociative).
>
> I like this idea. Is it appropriate to have just the whitespace as the
> delimiter though?
You could terminate with another @ or _ . Or these, plus the alternative
of white space. None is perfect - but it could be practical and useful.
>
> It also seems like it could be combined (perhaps painfully) with the
> requirement that some operators take parameters:
>
> a @foo(x,y) b
This could build a nice tensor notation. Eg the arguments specify the
summing subscripts.
Regards,
-----------
Bill Whiten, W.Whiten at mailbox.uq.oz.au
Julius Kruttschnitt Mineral Research Centre,
The University Of Queensland, Tel: int +61 7 3365 5888
Isles Rd, Indooroopilly, Fax: int +61 7 3365 5999
Brisbane Qld 4068, AUSTRALIA.
More information about the Python-list
mailing list