<commit_before>from linked_list import LinkedList

#Stack inherits from LinkedList class
class Stack(object):

    def __init__(self, iterable=None):
        if iterable != None:
            self._linkedList = LinkedList(iterable)
        else:
            self._linkedList = LinkedList()

    def push(self, value):
        self._linkedList.insert(value)

    def pop(self):
        return self._linkedList.pop()<commit_msg>add exception to pop.<commit_after>from linked_list import LinkedList

#Stack inherits from LinkedList class
class Stack(object):

    def __init__(self, iterable=None):
        if iterable != None:
            self._linkedList = LinkedList(iterable)
        else:
            self._linkedList = LinkedList()

    def push(self, value):
        self._linkedList.insert(value)

    def pop(self):
        try: 
            return self._linkedList.pop()
        except AttributeError:
            print "Error: Stack is empty. Nothing to pop."
            raise
{'fraction_non_alphanumeric': 0.08739837398373984, 'fraction_numerical': 0.0, 'mean_word_length': 2.4683098591549295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3642742', 'n_tokens_mistral': 270, 'n_tokens_neox': 262, 'n_words': 74}