# Path: partycrasher/crash.py
# class Stackframe(PCDict):
#     """
#     Represents a Stackframe in a crash object. Proxy object for a dictionary.
#     """
#     __slots__ = tuple()
#     
#     synonyms = {}
#     
#     canonical_fields = {
#         'depth': mustbe_int,
#         'address': maybe_string,
#         'function': maybe_string,
#         'args': maybe_string,
#         'file': maybe_string,
#         'dylib': maybe_string,
#     }
#     
#     def jsonify(self):
#         assert self["function"] != "None"
#         return self.as_dict()


from partycrasher.crash import Stackframe

class StringifiedList(list):
    
    def __init__(self, value=[], **kwargs):
        if isinstance(value, list):
            if len(value) == 0:
                return
            else:
                self.extend(value)
        else:
            raise AttributeError

    def extend(self, arg):
        return super(StringifiedList, self).extend(map(stringify_value, arg))

    def append(self, *args):
        return self.extend(args)

    def __setitem__(self, index, value):
        return super(StringifiedList, self).__setitem__(index, stringify_value(value))

    def __setslice__(self, i, j, seq):
        return super(StringifiedList, self).__setitem__(i, j, map(stringify_value, seq))

    def __eq__(self, other):
        return (super(StringifiedList, self).__eq__(other)
                and self.__class__ == other.__class__)

class Stacktrace(StringifiedList):


# Path: partycrasher/crash.py
# class Stackframe(PCDict):
#     """
#     Represents a Stackframe in a crash object. Proxy object for a dictionary.
#     """
#     __slots__ = tuple()
#     
#     synonyms = {}
#     
#     canonical_fields = {
#         'depth': mustbe_int,
#         'address': maybe_string,
#         'function': maybe_string,
#         'args': maybe_string,
#         'file': maybe_string,
#         'dylib': maybe_string,
#     }
#     
#     def jsonify(self):
#         assert self["function"] != "None"
#         return self.as_dict()


# Path: partycrasher/stringified.py
from partycrasher.crash import Stackframe


class StringifiedList(list):
    
    def __init__(self, value=[], **kwargs):
        if isinstance(value, list):
            if len(value) == 0:
                return
            else:
                self.extend(value)
        else:
            raise AttributeError

    def extend(self, arg):
        return super(StringifiedList, self).extend(map(stringify_value, arg))

    def append(self, *args):
        return self.extend(args)

    def __setitem__(self, index, value):
        return super(StringifiedList, self).__setitem__(index, stringify_value(value))

    def __setslice__(self, i, j, seq):
        return super(StringifiedList, self).__setitem__(i, j, map(stringify_value, seq))

    def __eq__(self, other):
        return (super(StringifiedList, self).__eq__(other)
                and self.__class__ == other.__class__)

class Stacktrace(StringifiedList):


    stackframe_class = Stackframe