def record_delete_subfield_from(rec, tag, subfield_position,<EOL>field_position_global=None,<EOL>field_position_local=None):
subfields = record_get_subfields(<EOL>rec, tag,<EOL>field_position_global=field_position_global,<EOL>field_position_local=field_position_local)<EOL>try:<EOL><INDENT>del subfields[subfield_position]<EOL><DEDENT>except IndexError:<EOL><INDENT>raise InvenioBibRecordFieldError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" %<EOL>{"<STR_LIT>": subfield_position,<EOL>"<STR_LIT>": str(field_position_local),<EOL>"<STR_LIT>": str(field_position_global),<EOL>"<STR_LIT>": tag})<EOL><DEDENT>if not subfields:<EOL><INDENT>if field_position_global is not None:<EOL><INDENT>for position, field in enumerate(rec[tag]):<EOL><INDENT>if field[<NUM_LIT:4>] == field_position_global:<EOL><INDENT>del rec[tag][position]<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>del rec[tag][field_position_local]<EOL><DEDENT>if not rec[tag]:<EOL><INDENT>del rec[tag]<EOL><DEDENT><DEDENT>
Delete subfield from position specified.

Specify the subfield by tag, field number and subfield position.