On Sun, Oct 21, 2012 at 8:11 PM, Antoine Pitrou <[email protected]> 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   |   [email protected]   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to