def createFactoryCopy(state):
 stateId = state.get('id', None)
 if (stateId is None):
  raise RuntimeError(("factory copy state has no 'id' member %s" % (repr(state),)))
 if (not (stateId in SimpleFactoryCopy.allIDs)):
  raise RuntimeError(('factory class has no ID: %s' % (SimpleFactoryCopy.allIDs,)))
 inst = SimpleFactoryCopy.allIDs[stateId]
 if (not inst):
  raise RuntimeError('factory method found no object with id')
 return inst

def createFactoryCopy ( state ) : stateId = state . get ( 'id' , None ) if ( stateId is None ) : raise RuntimeError ( ( "factory copy state has no 'id' member %s" % ( repr ( state ) , ) ) ) if ( not ( stateId in SimpleFactoryCopy . allIDs ) ) : raise RuntimeError ( ( 'factory class has no ID: %s' % ( SimpleFactoryCopy . allIDs , ) ) ) inst = SimpleFactoryCopy . allIDs [ stateId ] if ( not inst ) : raise RuntimeError ( 'factory method found no object with id' ) return inst
factory of l{simplefactorycopy} .