why did GMPY change the names of its functions?
Terry Reedy
tjreedy at udel.edu
Mon Mar 26 11:39:29 EDT 2012
On 3/26/2012 12:59 AM, Mensanator wrote:
> OK, GMPY is now called GMPY2. No big deal, I can import as GMPY.
>
> But why were scan0 and scan1 changed to bit_scan0 and bit_scan1?
Guess: Either the functions changed or they want to regularize their names.
> What's the justification for that? I use those functions extensively
> in my library of Collatz utilities and I had to re-edit them for no
> obvious reason.
If GMPY is coded in Python with a C? backup, GMPY.scan0 = GMPY.bit_scan0
should work.
Or you could write a GMPY.py wrapper for GMPY2
from GMPY2 import *
scan0=bit_scan0
scan1=bit_scan1
<any other compatibility hacks>
and leave your user code alone.
--
Terry Jan Reedy
More information about the Python-list
mailing list