diff options
author | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 (GMT) |
commit | a18af4e7a2091d11478754eb66ae387a85535763 (patch) | |
tree | fea8015d656cfee937bb6f3d106e6ca0e9f19d78 /Lib/hotshot | |
parent | 4d2adcca52ced412d4bdf131b872729c43520d58 (diff) | |
download | cpython-a18af4e7a2091d11478754eb66ae387a85535763.zip cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.gz cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.bz2 |
PEP 3114: rename .next() to .__next__() and add next() builtin.
Diffstat (limited to 'Lib/hotshot')
-rw-r--r-- | Lib/hotshot/log.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py index 059142e..880b25c 100644 --- a/Lib/hotshot/log.py +++ b/Lib/hotshot/log.py @@ -29,7 +29,7 @@ class LogReader: self._funcmap = {} self._reader = _hotshot.logreader(logfn) - self._nextitem = self._reader.next + self._nextitem = self._reader.__next__ self._info = self._reader.info if 'current-directory' in self._info: self.cwd = self._info['current-directory'] @@ -93,7 +93,7 @@ class LogReader: # same bound method can be used as the __getitem__() method -- this # avoids using an additional method call which kills the performance. - def next(self, index=0): + def __next__(self, index=0): while 1: # This call may raise StopIteration: what, tdelta, fileno, lineno = self._nextitem() |