Fix namedtuple bug reported by Glenn Linderman. Template did not form correctly if the field names were input in Unicode.
diff --git a/Lib/collections.py b/Lib/collections.py
index 2408818..ace2b2a 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -38,7 +38,7 @@
# generating informative error messages and preventing template injection attacks.
if isinstance(field_names, basestring):
field_names = field_names.replace(',', ' ').split() # names separated by whitespace and/or commas
- field_names = tuple(field_names)
+ field_names = tuple(map(str, field_names))
for name in (typename,) + field_names:
if not all(c.isalnum() or c=='_' for c in name):
raise ValueError('Type names and field names can only contain alphanumeric characters and underscores: %r' % name)