summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-08 02:02:05 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-08 02:02:05 (GMT)
commit581671419f62ebc6155ff47929a531a6904f3c19 (patch)
treec6ceea4b31c44e3eee6be9f73145f3ab7fe49c8b /Lib
parentf6b769b4646b310730938def5e37fba8a89b47af (diff)
downloadcpython-581671419f62ebc6155ff47929a531a6904f3c19.zip
cpython-581671419f62ebc6155ff47929a531a6904f3c19.tar.gz
cpython-581671419f62ebc6155ff47929a531a6904f3c19.tar.bz2
Expand comment.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/collections.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py
index 099cdd6..a234b44 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -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)