[Numpy-discussion] Possible new multiplication operators for Python

Charles R Harris charlesr.harris@gmail....
Sun Aug 17 14:38:13 CDT 2008


On Sun, Aug 17, 2008 at 7:01 AM, Alan G Isaac <aisaac@american.edu> wrote:

> Aside from "more operators needed", is there a consensus
> view among the developers?
>
> Taking a user's perspective, I see a short run and a long
> run.
>
> SR: I am very comfortable with adding dot versions of operators.
> I am not worried about reversing the Matlab/GAUSS meanings,
> but if others are very worried, we could append the dot
> instead of prepending it.
>
> LR: It would be great to use unicode math operators.
> On this issue, Fortress is being foresightful.
> Accepting the "times" symbol would be a fairly small move
> for most users, since it is in the Latin 1 extension of
> ASCII.
>

I kinda like the unicode idea because of the current dearth of usable
symbols. In fact, my system is already using utf-8.

$[charris@f9 ~]$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

And keymaps are not that hard to do in most editors. However... there are
various unicode encodings and locales, often indicated by the first few
bytes in a file. It's not clear to me that these encodings are universally
implemented at this time and I would be loath to depend on them without some
testing. Even so, it might be good to reserve a few symbols for future use
as operators.  The resistance to adding these operators might be less among
Python developers because they are less visible, not multicharater, and
won't conflict with current python usage. So at the least I think we should
try to get some unicode symbols set aside and maybe several years from now
we can start using them.

Here is an interesting little article on unicode for
unix<http://eyegene.ophthy.med.umich.edu/unicode/>.
Here are some links to various
symbols<http://mindprod.com/jgloss/unicode.html#SYMBOLS>.
And here is a bit of unicode just so we can see how it looks for various
folks.

A = B⊛C

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080817/6be20335/attachment-0001.html 


More information about the Numpy-discussion mailing list