← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~cjwatson/launchpad:next-builtin into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/codehosting/sftp.py b/lib/lp/codehosting/sftp.py
> index 51d42e7..48e7671 100644
> --- a/lib/lp/codehosting/sftp.py
> +++ b/lib/lp/codehosting/sftp.py
> @@ -111,7 +111,7 @@ class DirectoryListing:
>          return self
>  
>      def next(self):

Shouldn't we implement a __next__ method in this class, to make it a bit more idiomatic for python 3? 

Maybe a simple `__next__ = next`, to allow calling `next(instance_of_this_class)`.

> -        return self.iter.next()
> +        return next(self.iter)
>  
>      def close(self):
>          # I can't believe we had to implement a whole class just to


-- 
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/380096
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:next-builtin into launchpad:master.


References