def __delitem__(self, key):
if self.entries_collection is not None:<EOL><INDENT>self.entries_collection.delete_entry(self[key])<EOL><DEDENT>super(EntriesList, self).__delitem__(key)<EOL>if not self and self.entries_collection is not None:<EOL><INDENT>self.entries_collection.delete_date(self.date)<EOL><DEDENT>
Delete the given element from the list and synchronize the textual
representation.