We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0f3aa87 + 4515e5b commit 29727b9Copy full SHA for 29727b9
2 files changed
nameparser/parser.py
@@ -134,7 +134,7 @@ def __unicode__(self):
134
return " ".join(self)
135
136
def __str__(self):
137
- if sys.version >= '3':
+ if sys.version_info[0] >= 3:
138
return self.__unicode__()
139
return self.__unicode__().encode(self.encoding)
140
@@ -151,7 +151,7 @@ def __repr__(self):
151
'suffix': self.suffix or '',
152
'nickname': self.nickname or '',
153
}
154
155
return _string
156
return _string.encode(self.encoding)
157
nameparser/util.py
@@ -13,7 +13,7 @@ def emit(self, record):
13
14
15
import sys
16
-if sys.version < '3':
+if sys.version_info[0] < 3:
17
18
text_type = unicode
19
binary_type = str
0 commit comments