gmpy 1.01 rc near... anybody wanna test>

Alex Martelli aleax at mail.comcast.net
Mon Nov 7 10:54:33 EST 2005


<casevh at comcast.net> wrote:

> I downloaded and tried the CVS version. Division still didn't work as
> expected.

Now that's truly interesting...

> >>> import gmpy
> >>> gmpy.version()
> '1.01'
> >>> gmpy.mpz(9)//gmpy.mpz(4)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: unsupported operand type(s) for //: 'mpz' and 'mpz'

while, on my machine:

Helen:~/gmpy/test alex$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy
>>> gmpy.mpz(9)//gmpy.mpz(4)
mpz(2)
>>> 

etc, etc.

The CVS commit which I did before the post you're replying to gave me:

...
Checking in src/gmpy.c;
/cvsroot/gmpy/gmpy/src/gmpy.c,v  <--  gmpy.c
new revision: 1.14; previous revision: 1.13
done
Mailing gmpy-commits at lists.sourceforge.net...
Generating notification message...
Generating notification message... done.

and the logfile should be...:


Helen:~/gmpy alex$ cvs log src/gmpy.c | head -20
aleax at cvs.sourceforge.net's password: 

RCS file: /cvsroot/gmpy/gmpy/src/gmpy.c,v
Working file: src/gmpy.c
head: 1.14
branch:
locks: strict
access list:
symbolic names:
        import_release: 1.1.1.1
        import_vendor: 1.1.1
keyword substitution: kv
total revisions: 15;    selected revisions: 15
description:
----------------------------
revision 1.14
date: 2005/11/07 05:29:24;  author: aleax;  state: Exp;  lines: +83 -2

Add floordiv and truediv implementations to mpz, mpq, mpf (unittests
still need to be added).
----------------------------
revision 1.13
...


Unfortunately, I didn't have a CVS $Id$ in gmpy.c (silly me!) so
checking that you have the right version was hard.  I have now added it,
and an accessor to it from Python:

Helen:~/gmpy/test alex$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy
>>> gmpy._cvsid()
'$Id: gmpy.c,v 1.15 2005/11/07 15:43:24 aleax Exp $'
>>> 

Can you cvs update again and check what's going on?  Thanks!


Alex



More information about the Python-list mailing list