Raymond L. Buvel <[EMAIL PROTECTED]> wrote:
...
> This is a bit off topic but I would like to know how you would go about
> doing an implicit operation with an mpz and Decimal becoming a Decimal.
I would tweak Decimal.__new__ to accept an mpz and perform an int() on
it before proceeding as it d
Alex Martelli wrote:
> As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
> transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
> vice versa (the conversions are all possible, but a bit laborious, e.g.
> by explicitly going through string-forms).
>
> I'm thin
Alex Martelli <[EMAIL PROTECTED]> wrote:
> As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
> transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
> vice versa (the conversions are all possible, but a bit laborious, e.g.
> by explicitly going through stri
As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
vice versa (the conversions are all possible, but a bit laborious, e.g.
by explicitly going through string-forms).
I'm thinking about possible ways to fix t