diff --git a/actrie/__init__.py b/actrie/__init__.py
index bae29cd..a3f7c33 100644
--- a/actrie/__init__.py
+++ b/actrie/__init__.py
@@ -5,4 +5,4 @@
__all__ = ["Matcher", "Context", "PrefixMatcher"]
-__version__ = "3.2.1"
+__version__ = "3.2.2"
diff --git a/actrie/pattern.py b/actrie/pattern.py
index c387608..231cc36 100644
--- a/actrie/pattern.py
+++ b/actrie/pattern.py
@@ -11,7 +11,7 @@ class Enum(object):
from .tokenizer import Tokenizer
-from .util import convert2unicode, is_py3k
+from .util import convert2unicode, is_py2k
meta_char = {u"(", u")", u"|", u"."}
@@ -167,7 +167,7 @@ def ustr(self):
return self.text
def __str__(self):
- return self.ustr() if is_py3k else self.ustr().encode("utf-8")
+ return self.ustr() if not is_py2k else self.ustr().encode("utf-8")
class AlternationPattern(Pattern):
@@ -183,7 +183,7 @@ def ustr(self):
return u"(" + u"|".join([p.ustr() for p in self.alters]) + u")"
def __str__(self):
- return self.ustr() if is_py3k else self.ustr().encode("utf-8")
+ return self.ustr() if not is_py2k else self.ustr().encode("utf-8")
class AntiAmbiguousPattern(Pattern):
@@ -197,7 +197,7 @@ def ustr(self):
return self.origin.ustr() + u"(?&!" + u"|".join([p.ustr() for p in self.ambis]) + u")"
def __str__(self):
- return self.ustr() if is_py3k else self.ustr().encode("utf-8")
+ return self.ustr() if not is_py2k else self.ustr().encode("utf-8")
class DistancePattern(Pattern):
@@ -212,5 +212,5 @@ def ustr(self):
return self.head.ustr() + u".{0," + convert2unicode(str(self.dist)) + u"}" + self.tail.ustr()
def __str__(self):
- return self.ustr() if is_py3k else self.ustr().encode("utf-8")
+ return self.ustr() if not is_py2k else self.ustr().encode("utf-8")
diff --git a/jni/pom.xml b/jni/pom.xml
index 7853e17..fc17879 100644
--- a/jni/pom.xml
+++ b/jni/pom.xml
@@ -4,7 +4,7 @@
psn.ifplusor
actrie
- 3.2.1
+ 3.2.2
nar
actrie