Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Delta Between Two Patch Sets: Lib/test/test_operator.py

Issue 602: range: lean and mean (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Left Patch Set: __len__ is back! Created 1 year, 6 months ago
Right Patch Set: address more concerns Created 1 year, 6 months ago , Downloaded from: http://bugs.python.org/file10183/range_lean_and_mean5.patch
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 import operator 1 import operator
2 import unittest 2 import unittest
3 3
4 from test import test_support 4 from test import test_support
5 5
6 class Seq1: 6 class Seq1:
7 def __init__(self, lst): 7 def __init__(self, lst):
8 self.lst = lst 8 self.lst = lst
9 def __len__(self): 9 def __len__(self):
10 return len(self.lst) 10 return len(self.lst)
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 import gc 472 import gc
473 counts = [None] * 5 473 counts = [None] * 5
474 for i in range(len(counts)): 474 for i in range(len(counts)):
475 test_support.run_unittest(*test_classes) 475 test_support.run_unittest(*test_classes)
476 gc.collect() 476 gc.collect()
477 counts[i] = sys.gettotalrefcount() 477 counts[i] = sys.gettotalrefcount()
478 print(counts) 478 print(counts)
479 479
480 if __name__ == "__main__": 480 if __name__ == "__main__":
481 test_main(verbose=True) 481 test_main(verbose=True)
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483