def edit_choice(self, choice_id, text, inline_region, name='<STR_LIT>'):
if inline_region not in self.my_osid_object_form._my_map['<STR_LIT>']:<EOL><INDENT>raise IllegalState('<STR_LIT>')<EOL><DEDENT>for choice in self.my_osid_object_form._my_map['<STR_LIT>'][inline_region]:<EOL><INDENT>if choice['<STR_LIT:id>'] == choice_id:<EOL><INDENT>if choice['<STR_LIT:text>'] != text:<EOL><INDENT>choice['<STR_LIT:text>'] = text<EOL><DEDENT>if choice['<STR_LIT:name>'] != name and name != '<STR_LIT>':<EOL><INDENT>choice['<STR_LIT:name>'] = name<EOL><DEDENT>break<EOL><DEDENT><DEDENT>
edit an existing choice, to keep the ID the same