Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22196

Re: why did GMPY change the names of its functions?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'terry': 0.09; 'wrapper': 0.09; 'jan': 0.10; 'python': 0.11; '12:59': 0.16; 'names.': 0.16; 'reason.': 0.16; 'received:80.91': 0.16; 'received:80.91.229': 0.16; 'received:gmane.org': 0.16; 'received:list': 0.16; 'received:verizon.net': 0.16; 'reedy': 0.16; 'that?': 0.18; 'wrote:': 0.21; 'header:In-Reply-To:1': 0.22; 'header:User- Agent:1': 0.23; 'import': 0.24; 'library': 0.24; 'work.': 0.25; 'extensively': 0.29; 'code': 0.29; 'subject:change': 0.33; 'could': 0.34; 'leave': 0.34; 'subject:?': 0.34; 'should': 0.35; 'why': 0.36; 'header:X-Complaints-To:1': 0.36; 'but': 0.36; 'subject:the': 0.37; 'called': 0.38; 'received:org': 0.38; 'changed': 0.38; 'to:addr:python-list': 0.39; 'either': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'skip:j 10': 0.61; 'obvious': 0.81; 'regularize': 0.84; 'alone.': 0.91; 'deal,': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: why did GMPY change the names of its functions?
Date Mon, 26 Mar 2012 11:39:29 -0400
References <39ff04b9-84a0-401c-a0a5-75e33cf59bc8@vy9g2000pbc.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-74-109-121-73.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
In-Reply-To <39ff04b9-84a0-401c-a0a5-75e33cf59bc8@vy9g2000pbc.googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1008.1332776385.3037.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1332776385 news.xs4all.nl 6935 [2001:888:2000:d::a6]:41888
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:22196

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

why did GMPY change the names of its functions? Mensanator <mensanator@aol.com> - 2012-03-25 21:59 -0700
  Re: why did GMPY change the names of its functions? alex23 <wuwei23@gmail.com> - 2012-03-25 22:43 -0700
  Re: why did GMPY change the names of its functions? Terry Reedy <tjreedy@udel.edu> - 2012-03-26 11:39 -0400
    Re: why did GMPY change the names of its functions? Mensanator <mensanator@aol.com> - 2012-03-26 11:27 -0700
  Re: why did GMPY change the names of its functions? casevh@gmail.com - 2012-03-26 11:33 -0700
    Re: why did GMPY change the names of its functions? Mensanator <mensanator@aol.com> - 2012-03-26 22:39 -0700

csiph-web