def _connections_for_states(base_mapper, uowtransaction, states):
 if uowtransaction.session.connection_callable:
  connection_callable = uowtransaction.session.connection_callable
 else:
  connection = None
  connection_callable = None
 for state in _sort_states(states):
  if connection_callable:
   connection = connection_callable(base_mapper, state.obj())
  elif (not connection):
   connection = uowtransaction.transaction.connection(base_mapper)
  mapper = _state_mapper(state)
  (yield (state, state.dict, mapper, connection))

def _connections_for_states ( base_mapper , uowtransaction , states ) : if uowtransaction . session . connection_callable : connection_callable = uowtransaction . session . connection_callable else : connection = None connection_callable = None for state in _sort_states ( states ) : if connection_callable : connection = connection_callable ( base_mapper , state . obj ( ) ) elif ( not connection ) : connection = uowtransaction . transaction . connection ( base_mapper ) mapper = _state_mapper ( state ) ( yield ( state , state . dict , mapper , connection ) )
return an iterator of .