]> granicus.if.org Git - python/commitdiff
We're no longer trying to support older Python versions with this
authorGuido van Rossum <guido@python.org>
Thu, 18 Jul 2002 14:33:14 +0000 (14:33 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 18 Jul 2002 14:33:14 +0000 (14:33 +0000)
codebase, so get rid of the pre-2.2 contingency.

Lib/hotshot/log.py

index 9e2f0688969b2cd43fd6b5722392caff4f1010d1..335fff90fffaca8a484f9f4c20af75dcae453e26 100644 (file)
@@ -132,13 +132,8 @@ class LogReader:
             else:
                 raise ValueError, "unknown event type"
 
-    if sys.version < "2.2":
-        # Don't add this for newer Python versions; we only want iteration
-        # support, not general sequence support.
-        __getitem__ = next
-    else:
-        def __iter__(self):
-            return self
+    def __iter__(self):
+        return self
 
     #
     #  helpers