Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def readlines(self, size=-1):
def __iter__(self):
return self

def next(self):
def __next__(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be a breaking change if people used next directly?

I am wondering if the old method name should be retained for safety, like so:

        def next(self):
              return self.__next__()

line = self.readline()
if not line:
raise StopIteration
Expand Down