[Edu-sig] More re Cross-pollinating Python with other Cool Languages

Guido van Rossum guido@python.org
Mon, 23 Sep 2002 22:16:44 -0400


> (1j)^10 is an unsupported operand type for ^
> 
> yet pow(1j,10) is just fine.  Why not have ^ invoke pow internally,
> if pow is more able to manage complex arguments?

Because ^ means xor in Python, ** is power. :-)

> Anyway, the idea wanted to underline was the coolness of
> letting 1r2 mean 1/2 -- it's a primitive number, like 1e10,
> not a 'string' result of repr().  If Python ever incorporates
> a rational number type at the primitive level, I wonder if
> this'd be a way to go. [etc.]

This is the subject of two PEPs, PEP 239 and 240.  I hear that a new
author is taking over editing, so maybe you'll find a willing ear
there.

--Guido van Rossum (home page: http://www.python.org/~guido/)