# Path: sqlalchemy/util/compat.py
#     def u(s):
#     def ue(s):
#     def b(s):
#         def callable(fn):
#     def cmp(a, b):
#     def b64encode(x):
#     def b64decode(x):
#     def iterbytes(buf):
#     def u(s):
#     def ue(s):
#     def b(s):
#     def import_(*args):
#     def print_(*args, **kwargs):
#         def __init__(self, values=None):
#         def __iter__(self):
#         def union(self, other):
#         def add(self, other):
#     def reraise(tp, value, tb=None, cause=None):
#     def raise_from_cause(exception, exc_info=None):
#     def raise_from_cause(exception, exc_info=None):
#     def exec_(func_text, globals_, lcl=None):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
#     class WeakSet(object):
#     class metaclass(meta):
# 
# Path: sqlalchemy/util/compat.py
#     def u(s):
#     def ue(s):
#     def b(s):
#         def callable(fn):
#     def cmp(a, b):
#     def b64encode(x):
#     def b64decode(x):
#     def iterbytes(buf):
#     def u(s):
#     def ue(s):
#     def b(s):
#     def import_(*args):
#     def print_(*args, **kwargs):
#         def __init__(self, values=None):
#         def __iter__(self):
#         def union(self, other):
#         def add(self, other):
#     def reraise(tp, value, tb=None, cause=None):
#     def raise_from_cause(exception, exc_info=None):
#     def raise_from_cause(exception, exc_info=None):
#     def exec_(func_text, globals_, lcl=None):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
#     class WeakSet(object):
#     class metaclass(meta):


import itertools
import weakref
import operator
from .compat import threading, itertools_filterfalse
from . import py2k

    def get(self, key, default=None):
        if key in self:
            return self[key]
        else:
            return default

    def keys(self):
        return list(self._data)

    def values(self):
        return list(self._data.values())

    def items(self):
        return list(self._data.items())

    def has_key(self, key):
        return key in self._data

    def clear(self):
        self._data.clear()


class OrderedProperties(Properties):
    """Provide a __getattr__/__setattr__ interface with an OrderedDict
    as backing store."""
    def __init__(self):
        Properties.__init__(self, OrderedDict())



# Path: sqlalchemy/util/compat.py
#     def u(s):
#     def ue(s):
#     def b(s):
#         def callable(fn):
#     def cmp(a, b):
#     def b64encode(x):
#     def b64decode(x):
#     def iterbytes(buf):
#     def u(s):
#     def ue(s):
#     def b(s):
#     def import_(*args):
#     def print_(*args, **kwargs):
#         def __init__(self, values=None):
#         def __iter__(self):
#         def union(self, other):
#         def add(self, other):
#     def reraise(tp, value, tb=None, cause=None):
#     def raise_from_cause(exception, exc_info=None):
#     def raise_from_cause(exception, exc_info=None):
#     def exec_(func_text, globals_, lcl=None):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
#     class WeakSet(object):
#     class metaclass(meta):
# 
# Path: sqlalchemy/util/compat.py
#     def u(s):
#     def ue(s):
#     def b(s):
#         def callable(fn):
#     def cmp(a, b):
#     def b64encode(x):
#     def b64decode(x):
#     def iterbytes(buf):
#     def u(s):
#     def ue(s):
#     def b(s):
#     def import_(*args):
#     def print_(*args, **kwargs):
#         def __init__(self, values=None):
#         def __iter__(self):
#         def union(self, other):
#         def add(self, other):
#     def reraise(tp, value, tb=None, cause=None):
#     def raise_from_cause(exception, exc_info=None):
#     def raise_from_cause(exception, exc_info=None):
#     def exec_(func_text, globals_, lcl=None):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
#     class WeakSet(object):
#     class metaclass(meta):


# Path: sqlalchemy/util/_collections.py
import itertools
import weakref
import operator
from .compat import threading, itertools_filterfalse
from . import py2k


    def get(self, key, default=None):
        if key in self:
            return self[key]
        else:
            return default

    def keys(self):
        return list(self._data)

    def values(self):
        return list(self._data.values())

    def items(self):
        return list(self._data.items())

    def has_key(self, key):
        return key in self._data

    def clear(self):
        self._data.clear()


class OrderedProperties(Properties):
    """Provide a __getattr__/__setattr__ interface with an OrderedDict
    as backing store."""
    def __init__(self):
        Properties.__init__(self, OrderedDict())



class ImmutableProperties(ImmutableContainer, Properties):