A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/078197.html below:

[Python-Dev] Decimal(unicode)

[Python-Dev] Decimal(unicode) [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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4