Custom operator
Gerrit
gerrit at nl.linux.org
Fri Feb 6 05:49:40 EST 2004
mathias.foehr at mails.lu wrote:
> I want to define new operators because mathematicians use special operators
> (
> eg circle plus (+), circle times (*), arrows ->
> ) since centuries. It increases readability in this area and people have
> got used to it.
Hm, but all syntax would have to be ASCII anyway. A + can be overridden
with __add__, a * with __mul__, and maybe there would even be an ugly
hack to override -> using __sub__ and __gt__, although I don't think so.
But adding new characters is certainly not possible.
Gerrit.
--
PrePEP: Builtin path type
http://people.nl.linux.org/~gerrit/creaties/path/pep-xxxx.html
Asperger's Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/
More information about the Python-list
mailing list