Changeset 2881


Ignore:
Timestamp:
Jul 29, 2010 11:43:29 AM (9 years ago)
Author:
prsteel
Message:

Updated alias definition of Block to match baseline tests.

Updated import symantics to cut down two verbose code statements.

File:
1 edited

Legend:

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

    r2865 r2881  
    2828from plugin import *
    2929
    30 import pyutilib.component.core
     30from pyutilib.component.core import alias, ExtensionPoint
    3131from pyutilib.misc import Container
    3232
     
    5151    """
    5252
    53     pyutilib.component.core.alias("Block",
    54         'Blocks are indexed components that contain one other model components.')
     53    alias("Block", "Blocks are indexed components that contain one or more " + \
     54          "other model components.")
    5555
    5656    def __init__(self, *args, **kwargs):
     
    223223        #
    224224        items = [Set, RangeSet, Param, Var, Objective, Constraint, Block]
    225         for item in pyutilib.component.core.ExtensionPoint(IModelComponent):
     225        for item in ExtensionPoint(IModelComponent):
    226226            if not item in items:
    227227                items.append(item)
Note: See TracChangeset for help on using the changeset viewer.