Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: 
Changeset: r61036:d8841110c366
Date: 2013-02-10 12:54 +0200
http://bitbucket.org/pypy/pypy/changeset/d8841110c366/

Log:    merge

diff --git a/lib-python/2.7/collections.py b/lib-python/2.7/collections.py
--- a/lib-python/2.7/collections.py
+++ b/lib-python/2.7/collections.py
@@ -295,7 +295,7 @@
         _fields = %(field_names)r \n
         def __new__(_cls, %(argtxt)s):
             'Create new instance of %(typename)s(%(argtxt)s)'
-            return tuple.__new__(_cls, (%(argtxt)s)) \n
+            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'
@@ -320,14 +320,14 @@
             'Return self as a plain tuple.  Used by copy and pickle.'
             return tuple(self) \n\n''' % locals()
     for i, name in enumerate(field_names):
-        template += "        %s = property(lambda self: self[%d], doc='Alias 
for field number %d')\n" % (name, i, i)
+        template += "        %s = _property(lambda self: self[%d], doc='Alias 
for field number %d')\n" % (name, i, 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 = {'__name__': 'namedtuple_%s' % typename,
-                 'OrderedDict': OrderedDict}
+    namespace = dict(__name__='namedtuple_%s' % typename,
+                     OrderedDict=OrderedDict, _property=property, _tuple=tuple)
     try:
         exec template in namespace
     except SyntaxError, e:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to