Python 2 and python 3 refactor fixes.

Updates #2619.
This commit is contained in:
Chris Johns
2016-03-09 14:27:42 +11:00
parent a5d243d3f8
commit 2de37f3432
5 changed files with 17 additions and 9 deletions

View File

@@ -188,6 +188,7 @@ class macros:
return macro[2]
def __setitem__(self, key, value):
key = self._unicode_to_str(key)
if type(key) is not str:
raise TypeError('bad key type (want str): %s' % (type(key)))
if type(value) is not tuple: