On Wed, Nov 28, 2018 at 2:28 PM E. Madison Bray <[email protected]> wrote:
> I mostly agree with the existing objections, though I have often found
> myself wanting this too, especially now that `map` does not simply
> return a list. This problem alone (along with the same problem for
> filter) has had a ridiculously outsized impact on the Python 3 porting
> effort for SageMath, and I find it really irritating at times.
I'm a mathematician, so understand your concerns. Here's what I hope
is a helpful suggestion.
Create a module, say sage.itertools that contains (not tested)
def py2map(iterable):
return list(map(iterable))
The porting to Python 3 (for map) is now reduced to writing
from .itertools import py2map as map
at the head of each module.
Please let me know if this helps.
--
Jonathan
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/