[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > >>> import gmpy > >>> gmpy.mpz(11) > mpz(11) > >>> gmpy.mpz('11',10) > mpz(11) > >>> gmpy.mpz(11,10) > > Traceback (most recent call last): > File "<pyshell#38>", line 1, in <module> > gmpy.mpz(11,10) > TypeError: gmpy.mpz() with numeric argument needs exactly 1 argument > > The mpz conversion takes two arguments if and only if s is a string, > else it takes 1 argument. So being non-empty is insufficient.
Being a string AND being non-empty is insufficient too -- just try gmpy.mpz("Hello, I am a string and definitely not empy!", 10) on for size. Alex -- http://mail.python.org/mailman/listinfo/python-list