Expand comment.

This commit is contained in:
Raymond Hettinger 2008-01-08 02:02:05 +00:00
parent f6b769b464
commit 581671419f
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ def namedtuple(typename, field_names, verbose=False):
"""
# Parse and validate the field names
# Parse and validate the field names. Validation serves two purposes,
# 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)