wangtongada / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

gmpy.mpq does not accept unicode strings #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
try: gmpy.mpq(u"1")

raises an exception:
"TypeError: gmpy.mpq() expects numeric or string argument"

Similar for gmpy.mpf(u"1")

The argument should be casted to ascii.

Original issue reported on code.google.com by runar.te...@gmail.com on 4 Jun 2009 at 12:53

GoogleCodeExporter commented 8 years ago
Unicode mostly works with Python 3.x on the very experimental changes I've been
making on the trunk. The trunk still has other issues, though. ;-)

I'll look at adding unicode support for Python 2.x after I resolve the issues 
with
Python 3.x.

Thanks for the bug reports.

Original comment by casevh on 4 Jun 2009 at 2:32

GoogleCodeExporter commented 8 years ago
Unicode support for Python 2.x has been added to gmpy 1.10. There will be an 
alpha
release in next few days.

Original comment by casevh on 5 Jul 2009 at 5:08

GoogleCodeExporter commented 8 years ago
Closing the issue.

Original comment by casevh on 5 Jul 2009 at 5:09

GoogleCodeExporter commented 8 years ago
Reopening. It has been fixed for mpz. I'll get mpq and mpf into the beta 
release.

Original comment by casevh on 6 Jul 2009 at 4:54

GoogleCodeExporter commented 8 years ago
Fixed in alpha2.

Original comment by casevh on 7 Jul 2009 at 6:34