#16078: Python 3 preparation: reduce() is no more a builtin function
-------------------------------------+-------------------------------------
       Reporter:  wluebbe            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  distribution       |   Resolution:
       Keywords:  python3            |    Merged in:
        Authors:  André Apitzsch     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/aapitzsch/ticket/16078           |  199db7e55872caf0d7468750e7e1f1847f768483
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by wluebbe:

Old description:

> The Py2 builtin function {{{reduce()}}} is available in Py3 as
> {{{functools.reduce()}}}.
>
> The tool 2to3 adds {{{from functools import reduce}}}.
> [[br]]
> But the code has to depend on the Python version!
>
> There are 24 effected modules.
>
> This ticket is tracked as a dependency of meta-ticket ticket:16052.

New description:

 The Py2 builtin function {{{reduce()}}} is available in Py3 as
 {{{functools.reduce()}}}.

 The tool 2to3 adds {{{from functools import reduce}}}.

 From the [[https://docs.python.org/2.7/library/functools.html#module-
 functools||Python 2.7 documentation]]: [[br]]
 functools.reduce(function, iterable[, initializer])[[br]]
 This is the same function as reduce(). It is made available in this module
 to allow writing code more forward-compatible with Python 3.
 New in version 2.6.

 This ticket is tracked as a dependency of meta-ticket ticket:16052.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/16078#comment:4>
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.

Reply via email to