My wishlist for Python3K
Thomas Wouters
thomas at xs4all.net
Thu Jun 8 16:00:32 EDT 2000
On Thu, Jun 08, 2000 at 10:19:18AM -0600, Andrew Dalke wrote:
> Thomas Wouters :
> >On Thu, Jun 08, 2000 at 01:47:14AM +0000, Huaiyu Zhu wrote:
> >> My wishlist for Python3K (This is not to start a flame war):
> >> 2. Augmentation operators: +=, *=, etc. Dot operators .*, ./, etc (for
> >> numerical computation to distinguish matrix and elementwise
> >> operations).
> >This needn't wait for Py3K, and in fact I'm writing code for this right
> >now,
> Would there be a problem with the ambiguity of "3./2" being parsed
> as either
> '3.' '/' '2' == 1.5
> '3' './' '2' == whatever ./ does to scalar integers, probably
> make it be regular division == 1
> ?
I'm afraid I was a bit careless in the quoting. I am not implementing the
'dot operators' for numerical computation, I'm only implementing augmented
assignment (+=, >>= and friends.) But for what it's worth, I think the 'dot
operators' as using a dot are out -- there is no way the parser can
distingish between float-creation, attribute-lookup and matrix-operations,
and still remain as obvious as it is now. At least, I dont think so. Using
another character would be possible, of course ;)
Hacking-ly yr's,
--
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list
mailing list