On Fri, 24 Mar 2017 21:51:39 +0530, Pulkit Goyal wrote: > On Fri, Mar 24, 2017 at 9:19 PM, Yuya Nishihara <y...@tcha.org> wrote: > > On Fri, 24 Mar 2017 21:00:24 +0530, Pulkit Goyal wrote: > > > This series is a part of fixing things which we already know will lead to > > > exception or wrong result. So instead of waiting for those exceptions to > > > pop up, it fixes them. It fixes all the occurrences in mercurial/ (couple > > > of occurrences are left where using maplist was not required). > > > > Not all map() are needed to be converted to maplist(). If we don't want to > > sort out them, we can simply redirect map to maplist by importer. > > On Python2.7 we expected the output of map() to be a list.
No. I sometimes just use map() because Python 2 has no built-in imap(). > Instead of sorting them out, it will be better to use importer than so that > we can have common > behaviour throughout our codebase. Let me know if you are convinced with > the idea of using importer > to rewrite map to pycompat.maplist and I will send a patch. If we took the bulk-replace route, I would like the idea of using importer. But I'd rather replacing only non-lazy map(). _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel