@utilities.arguments_not_none<EOL><INDENT>def edit_choice(self, new_choice, choice_id, inline_region):<DEDENT>
if inline_region not in self.my_osid_object_form._my_map['<STR_LIT>']:<EOL><INDENT>raise IllegalState('<STR_LIT>')<EOL><DEDENT>if not isinstance(new_choice, DisplayText):<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>choices = [c for c in self.my_osid_object_form._my_map['<STR_LIT>'][inline_region] if c['<STR_LIT:id>'] == choice_id]<EOL>if len(choices) == <NUM_LIT:0>:<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>for current_choice in self.my_osid_object_form._my_map['<STR_LIT>'][inline_region]:<EOL><INDENT>if choice_id == current_choice['<STR_LIT:id>']:<EOL><INDENT>index = self.get_index_of_language_type('<STR_LIT>',<EOL>new_choice.language_type,<EOL>dictionary=current_choice)<EOL>current_choice['<STR_LIT>'][index] = self._dict_display_text(new_choice)<EOL><DEDENT><DEDENT>
edit an existing choice, to keep the ID the same