Example #1
0
    def __setitem__(self, key, value):
        if not isinstance(key, tuple):
            key = (None, key)

        if key[0] is not None:
            if isinstance(key[0], str):
                pass

            elif isinstance(key[0], unicode):
                pass

            else:
                raise KeyError

        if isinstance(key[1], str):
            pass

        elif isinstance(key[1], unicode):
            pass

        else:
            raise KeyError

        if key == (None, 'xmlns'):
            raise AttributeError

        Dict.__setitem__(self, key, value)
Example #2
0
    def __init__(self, prefixes=None):
        Dict.__init__(self)

        self[URI_XML] = 'xml'

        if prefixes:
            self.update(prefixes)
Example #3
0
File: test.py Project: meng89/hooky
 def __init__(self, *args, **kwargs):
     Count.__init__(self)
     Dict.__init__(self, *args, **kwargs)
Example #4
0
    def __init__(self, attributes=None):
        Dict.__init__(self)

        if attributes:
            self.update(attributes)