~ubuntu-branches/ubuntu/utopic/ffc/utopic

« back to all changes in this revision

Viewing changes to ffc/utils.py

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2013-06-26 14:48:32 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130626144832-1xd8htax4s3utybz
Tags: 1.2.0-1
* New upstream release.
* debian/control:
  - Bump required version for python-ufc, python-fiat, python-instant
    and python-ufl in Depends field.
  - Bump Standards-Version to 3.9.4.
  - Remove DM-Upload-Allowed field.
  - Bump required debhelper version in Build-Depends.
  - Remove cdbs from Build-Depends.
  - Use canonical URIs for Vcs-* fields.
* debian/compat: Bump to compatibility level 9.
* debian/rules: Rewrite for debhelper (drop cdbs).

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
# Python modules.
24
24
import operator
 
25
import functools
25
26
 
26
27
# FFC modules.
27
28
from log import error
29
30
def product(sequence):
30
31
    "Return the product of all elements in a sequence."
31
32
    # Copied from UFL
32
 
    return reduce(operator.__mul__, sequence, 1)
 
33
    return functools.reduce(operator.__mul__, sequence, 1)
33
34
 
34
35
def all_equal(sequence):
35
36
    "Check that all items in list are equal."