Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: py3.6
Changeset: r97402:154e8302eb39
Date: 2019-09-07 18:29 +0200
http://bitbucket.org/pypy/pypy/changeset/154e8302eb39/

Log:    fix translation?

diff --git a/pypy/interpreter/astcompiler/fstring.py 
b/pypy/interpreter/astcompiler/fstring.py
--- a/pypy/interpreter/astcompiler/fstring.py
+++ b/pypy/interpreter/astcompiler/fstring.py
@@ -53,7 +53,9 @@
         stnode = fstr.stnode
         lineno = stnode.get_lineno() - 1 # one-based
         # CPython has an equivalent hack :-(
-        column_offset = stnode.value.find(source) + stnode.get_column()
+        value = stnode.get_value()
+        if value is not None:
+            column_offset = value.find(source) + stnode.get_column()
 
     info = pyparse.CompileInfo("<fstring>", "eval",
                                consts.PyCF_SOURCE_IS_UTF8 |
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to