[Python-Dev] return type of complex (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sun Oct 21 12:35:24 CEST 2012
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]