Author: Armin Rigo <ar...@tunes.org>
Branch: unicode-utf8-re
Changeset: r93346:80cb52b67f60
Date: 2017-12-10 08:27 +0100
http://bitbucket.org/pypy/pypy/changeset/80cb52b67f60/

Log:    in-progress: translation fixes, but I don't understand why I need
        that

diff --git a/pypy/module/_sre/interp_sre.py b/pypy/module/_sre/interp_sre.py
--- a/pypy/module/_sre/interp_sre.py
+++ b/pypy/module/_sre/interp_sre.py
@@ -334,6 +334,7 @@
                 else:
                     if use_builder != '\x00':
                         assert filter_as_string is not None
+                        assert strbuilder is not None
                         strbuilder.append(filter_as_string)
                     else:
                         sublist_w.append(w_filter)
@@ -347,6 +348,7 @@
             _sub_append_slice(ctx, space, use_builder, sublist_w,
                               strbuilder, last_pos, ctx.end)
         if use_builder != '\x00':
+            assert strbuilder is not None
             result_bytes = strbuilder.build()
             if use_builder == 'S':
                 assert not isinstance(ctx, rsre_utf8.Utf8MatchContext)
@@ -379,6 +381,7 @@
 def _sub_append_slice(ctx, space, use_builder, sublist_w,
                       strbuilder, start, end):
     if use_builder != '\x00':
+        assert strbuilder is not None
         if isinstance(ctx, rsre_core.BufMatchContext):
             assert use_builder == 'S'
             return strbuilder.append(ctx._buffer.getslice(start, end, 1, 
end-start))
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to