Changeset 3593


Ignore:
Timestamp:
Feb 9, 2011 7:40:31 PM (9 years ago)
Author:
khunter
Message:

Minor drive-by cleanup, grammaro fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/base/util.py

    r3592 r3593  
    3838"""
    3939def summation(*args, **kwds):
    40     if 'denom' in kwds:
    41         denom=kwds['denom']
    42     else:
    43         denom=()
    44     if not type(denom) in [list,tuple]:
    45         denom=[denom]
     40    denom = kwds.pop('denom', tuple() )
     41
     42    if type(denom) not in (list, tuple):
     43        denom = [denom]
    4644    if len(args) == 0 and len(denom) == 0:
    47         raise ValueError, "The summation() command requires at least on " + \
     45        raise ValueError, "The summation() command requires at least an " + \
    4846              "argument or a denominator term"
    4947    if 'index' in kwds:
Note: See TracChangeset for help on using the changeset viewer.