[Python-Dev] return type of __complex__
Nick Coghlan
ncoghlan at gmail.com
Sun Oct 21 12:35:24 CEST 2012
On Sun, Oct 21, 2012 at 8:11 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> I'm also not sure why we have several variants of the power operator:
> **, built-in pow(), math.pow().
Built-in pow() is provided for efficient modular arithmetic (via the
3-argument "pow(x, y, z)" form that means "x ** y % z")
I don't know the rationale math.pow() though - it may just stem from
the time when the math module was just a really thin wrapper around
the underlying C library's floating point math support.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list