Fix field name conflicts for named tuples.
diff --git a/Lib/collections.py b/Lib/collections.py
index 6e2fe29..bd5d3e8 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -232,8 +232,8 @@
         '%(typename)s(%(argtxt)s)' \n
         __slots__ = () \n
         _fields = %(field_names)r \n
-        def __new__(cls, %(argtxt)s):
-            return tuple.__new__(cls, (%(argtxt)s)) \n
+        def __new__(_cls, %(argtxt)s):
+            return _tuple.__new__(_cls, (%(argtxt)s)) \n
         @classmethod
         def _make(cls, iterable, new=tuple.__new__, len=len):
             'Make a new %(typename)s object from a sequence or iterable'
@@ -246,23 +246,23 @@
         def _asdict(self):
             'Return a new OrderedDict which maps field names to their values'
             return OrderedDict(zip(self._fields, self)) \n
-        def _replace(self, **kwds):
+        def _replace(_self, **kwds):
             'Return a new %(typename)s object replacing specified fields with new values'
-            result = self._make(map(kwds.pop, %(field_names)r, self))
+            result = _self._make(map(kwds.pop, %(field_names)r, _self))
             if kwds:
                 raise ValueError('Got unexpected field names: %%r' %% kwds.keys())
             return result \n
         def __getnewargs__(self):
             return tuple(self) \n\n''' % locals()
     for i, name in enumerate(field_names):
-        template += '        %s = property(itemgetter(%d))\n' % (name, i)
+        template += '        %s = _property(_itemgetter(%d))\n' % (name, i)
     if verbose:
         print(template)
 
     # Execute the template string in a temporary namespace and
     # support tracing utilities by setting a value for frame.f_globals['__name__']
-    namespace = dict(itemgetter=_itemgetter, __name__='namedtuple_%s' % typename,
-                     OrderedDict=OrderedDict)
+    namespace = dict(_itemgetter=_itemgetter, __name__='namedtuple_%s' % typename,
+                     OrderedDict=OrderedDict, _property=property, _tuple=tuple)
     try:
         exec(template, namespace)
     except SyntaxError as e:
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index c471361..ad79ad5 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -173,6 +173,15 @@
             self.assertEqual(p, q)
             self.assertEqual(p._fields, q._fields)
 
+    def test_name_conflicts(self):
+        # Some names like "self", "cls", "tuple", "itemgetter", and "property"
+        # failed when used as field names.  Test to make sure these now work.
+        T = namedtuple('T', 'itemgetter property self cls tuple')
+        t = T(1, 2, 3, 4, 5)
+        self.assertEqual(t, (1,2,3,4,5))
+        newt = t._replace(itemgetter=10, property=20, self=30, cls=40, tuple=50)
+        self.assertEqual(newt, (10,20,30,40,50))
+
 class ABCTestCase(unittest.TestCase):
 
     def validate_abstract_methods(self, abc, *names):