def _create_character(session, new_player, typeclass, home, permissions):
 try:
  new_character = create.create_object(typeclass, key=new_player.key, home=home, permissions=permissions)
  new_player.db._playable_characters.append(new_character)
  new_character.locks.add(('puppet:id(%i) or pid(%i) or perm(Immortals) or pperm(Immortals)' % (new_character.id, new_player.id)))
  if (not new_character.db.desc):
   new_character.db.desc = 'This is a Player.'
  new_player.db._last_puppet = new_character
 except Exception as e:
  session.msg(('There was an error creating the Character:\n%s\n If this problem persists, contact an admin.' % e))
  logger.log_trace()
  return False

def _create_character ( session , new_player , typeclass , home , permissions ) : try : new_character = create . create_object ( typeclass , key = new_player . key , home = home , permissions = permissions ) new_player . db . _playable_characters . append ( new_character ) new_character . locks . add ( ( 'puppet:id(%i) or pid(%i) or perm(Immortals) or pperm(Immortals)' % ( new_character . id , new_player . id ) ) ) if ( not new_character . db . desc ) : new_character . db . desc = 'This is a Player.' new_player . db . _last_puppet = new_character except Exception as e : session . msg ( ( 'There was an error creating the Character:\n%s\n If this problem persists, contact an admin.' % e ) ) logger . log_trace ( ) return False
helper function .