From 04fe76cfafa55df26b55c5629b7fb85ea85b53bc Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 22 Apr 2011 00:37:46 +0200 Subject: [PATCH] fix string constant declarations for non CPython-version-specific strings --- Cython/Compiler/Code.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 0935c6c3..c4c766cb 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -334,7 +334,9 @@ class StringConst(object): self.py_versions = [] def add_py_version(self, version): - if version and version not in self.py_versions: + if not version: + self.py_versions = [2,3] + elif version not in self.py_versions: self.py_versions.append(version) def get_py_string_const(self, encoding, identifier=None, -- 2.26.2