#16073: Python 3 preparation: The semantic of map() function is changed
-------------------------------------------------+-------------------------
Reporter: wluebbe | Owner:
Type: enhancement | Status:
Priority: major | needs_work
Component: distribution | Milestone: sage-6.7
Keywords: python3 | Resolution:
Authors: Wilfried Luebbe, André | Merged in:
Apitzsch | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #18472, #18473, #18474, | Stopgaps:
#18531, #18532, #18553 |
-------------------------------------------------+-------------------------
Changes (by wluebbe):
* dependencies: #18472, #18473, #18474, #18531, #18532 => #18472, #18473,
#18474, #18531, #18532, #18553
Old description:
> In Py2 {{{map()}}} returns a list, while in Py3 {{{map()}}} returns an
> iterator (as {{{itertools.imap()}}} does in Py2).
>
> The tool 2to3 wraps {{{map()}}} usages with a call to {{{list()}}}.
> [[br]]
> An alternative approach is to add {{{from future_builtins import map}}}
> and to check the code.
>
> There are 171 effected modules.
>
> This ticket is tracked as a dependency of meta-ticket ticket:16052.
New description:
In Py2 {{{map()}}} returns a list, while in Py3 {{{map()}}} returns an
iterator (as {{{itertools.imap()}}} does in Py2).
The tool 2to3 wraps {{{map()}}} usages with a call to {{{list()}}}.
[[br]]
An alternative approach is to add {{{from future_builtins import map}}}
and to check the code.
This ticket is tracked as a dependency of meta-ticket ticket:16052.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/16073#comment:55>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.