Matt Chaput committed dbe3638

Force keys to be str before using a dict as **kwargs. Fixes issue #157.
I'm not sure in what Python version match.groupdict() produces unicode keys (I couldn't reproduce it) but the fix is harmless.

Comments (0)

Files changed (1)


         return ()
     def create(self, parser, match):
-        kwargs = match.groupdict()
+        # Groupdict keys can be unicode sometimes apparently? Convert them to
+        # str for use as keyword arguments. This should be Py3-safe.
+        kwargs = dict((str(k), v) for k, v in iteritems(match.groupdict()))
         return self.nodetype(**kwargs)