[Python-Dev] Decimal(unicode)

Facundo Batista facundobatista at gmail.com
Tue Mar 25 16:51:20 CET 2008


2008/3/25, Nick Coghlan <ncoghlan at gmail.com>:

>
>  Anyway, +1 on coercing the mantissa to a str() instance in 2.5.
>

I don't know about 2.5, I'm sure about 2.6.


>  To fix this, decimal probably needs to grow something like the following
>  near the top of the module:
>
>  try:
>    _bytes = bytes
>  except NameError: # 2.5 or earlier
>    _bytes = str
>
>  and then use _bytes instead of str as appropriate throughout the rest of
>  the module.

+1, I updated the bug created by Oleg.


>  The isinstance(value, str) check in Py3k is too restrictive - it needs
>  to accept bytes instances as well.

Why? The number in a string should be just strings, IMHO, not bytes...
do you have a case of use for this?

Thanks!

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the Python-Dev mailing list