[pypy-commit] pypy py3k: add a comment
antocuni
noreply at buildbot.pypy.org
Thu Aug 2 19:10:36 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r56534:703d5af5dcc1
Date: 2012-08-02 11:43 +0200
http://bitbucket.org/pypy/pypy/changeset/703d5af5dcc1/
Log: add a comment
diff --git a/pypy/objspace/std/strutil.py b/pypy/objspace/std/strutil.py
--- a/pypy/objspace/std/strutil.py
+++ b/pypy/objspace/std/strutil.py
@@ -188,7 +188,12 @@
# unicode-decimal to ascii-decimal conversion already happened
# earlier). We just set ascii_s to something which will fail when
# passed to rstring_to_float, to keep the code as similar as possible
- # to the one we have on default
+ # to the one we have on default.
+ #
+ # Note that CPython does something different and it encodes the string
+ # to UTF-8 before trying to parse it. We cannot since .encode('utf-8')
+ # is not RPython. However, it doesn't change anything since the UTF-8
+ # encoded string would make rstring_to_float to fail anyway.
ascii_s = "not a float"
else:
low = ascii_s.lower()
More information about the pypy-commit
mailing list