def bind(obj, iterable, stepper=None):
    """Bind the iterable's values to the object.

      obj - where to bind the names.
      iterable - used to name the attributes and drive the mapper.
      stepper - the step function that generates the mapped values.
    
    Use this function to bind attribute names to any object.  It is
    used by the Constants class to that effect.  If the iterable is a
    mapping, it is used directly for the name/value pairs.  Otherwise
    the attribute values are built by the stepper.  See the
    build_mapping() function for more information.

    """

    for key, value in build_mapping(iterable, stepper):
        setattr(obj, key, value)
Bind the iterable's values to the object.

      obj - where to bind the names.
      iterable - used to name the attributes and drive the mapper.
      stepper - the step function that generates the mapped values.
    
    Use this function to bind attribute names to any object.  It is
    used by the Constants class to that effect.  If the iterable is a
    mapping, it is used directly for the name/value pairs.  Otherwise
    the attribute values are built by the stepper.  See the
    build_mapping() function for more information.

    
recipes/Python/577755_Simple_but_Powerful_Grouped_Constants__Step/recipe-577755.py