mailr23606 - /trunk/lib/compat.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 29, 2014 - 20:53:
Author: bugman
Date: Thu May 29 20:53:15 2014
New Revision: 23606

URL: http://svn.gna.org/viewcvs/relax?rev=23606&view=rev
Log:
The built in Python range() function is no longer being replaced by xrange().

Replacing builtin.range() with builtin.xragne() on Python 2 was causing 
problems with Python
site-packages which were not Python 3 compliant.  This includes old numpy 
versions.

The original overwriting of range() with xrange() was for both speed and 
memory conservation.
However profiling the system tests, the time for all tests did not change 
significantly.

This change may cause problems in certain places in relax on memory 
constrained computer systems,
so it may need to be reverted in the future.


Modified:
    trunk/lib/compat.py

Modified: trunk/lib/compat.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/compat.py?rev=23606&r1=23605&r2=23606&view=diff
==============================================================================
--- trunk/lib/compat.py (original)
+++ trunk/lib/compat.py Thu May 29 20:53:15 2014
@@ -369,7 +369,7 @@
 if PY_VERSION == 2:
     # Switch all range() calls to xrange() for increased speed and memory 
reduction.
     # This should work as all range() usage for Python 3 in relax must match 
the old xrange() usage.
-    builtins.range = builtins.xrange
+    #builtins.range = builtins.xrange
 
     # The sorted() builtin function for Python 2.3 and earlier.
     if sys.version_info[1] <= 3:




Related Messages


Powered by MHonArc, Updated Fri May 30 10:00:03 2014