# Path: scss/types.py
# class Undefined(Null):
#     sass_type_name = 'undefined'
# 
#     def __init__(self, value=None):
#         pass
# 
#     def __add__(self, other):
#         return self
# 
#     def __radd__(self, other):
#         return self
# 
#     def __sub__(self, other):
#         return self
# 
#     def __rsub__(self, other):
#         return self
# 
#     def __div__(self, other):
#         return self
# 
#     def __rdiv__(self, other):
#         return self
# 
#     def __truediv__(self, other):
#         return self
# 
#     def __rtruediv__(self, other):
#         return self
# 
#     def __floordiv__(self, other):
#         return self
# 
#     def __rfloordiv__(self, other):
#         return self
# 
#     def __mul__(self, other):
#         return self
# 
#     def __rmul__(self, other):
#         return self
# 
#     def __pos__(self):
#         return self
# 
#     def __neg__(self):
#         return self
# 
# Path: scss/types.py
# class Value(object):
#     is_null = False
#     sass_type_name = 'unknown'
# 
#     def __repr__(self):
#         return "<{0}: {1!r}>".format(type(self).__name__, self.value)
# 
#     # Sass values are all true, except for booleans and nulls
#     def __bool__(self):
#         return True
# 
#     def __nonzero__(self):
#         # Py 2's name for __bool__
#         return self.__bool__()
# 
#     # All Sass scalars also act like one-element spaced lists
#     use_comma = False
# 
#     def __iter__(self):
#         return iter((self,))
# 
#     def __len__(self):
#         return 1
# 
#     def __getitem__(self, key):
#         if key not in (-1, 0):
#             raise IndexError(key)
# 
#         return self
# 
#     def __contains__(self, item):
#         return self == item
# 
#     ### NOTE: From here on down, the operators are exposed to Sass code and
#     ### thus should ONLY return Sass types
# 
#     # Reasonable default for equality
#     def __eq__(self, other):
#         return Boolean(
#             type(self) == type(other) and self.value == other.value)
# 
#     def __ne__(self, other):
#         return Boolean(not self.__eq__(other))
# 
#     # Only numbers support ordering
#     def __lt__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __le__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __gt__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __ge__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     # Math ops
#     def __add__(self, other):
#         # Default behavior is to treat both sides like strings
#         if isinstance(other, String):
#             return String(self.render() + other.value, quotes=other.quotes)
#         return String(self.render() + other.render())
# 
#     def __sub__(self, other):
#         # Default behavior is to treat the whole expression like one string
#         return String.unquoted(self.render() + "-" + other.render())
# 
#     def __div__(self, other):
#         return String.unquoted(self.render() + "/" + other.render())
# 
#     # Sass types have no notion of floor vs true division
#     def __truediv__(self, other):
#         return self.__div__(other)
# 
#     def __floordiv__(self, other):
#         return self.__div__(other)
# 
#     def __mul__(self, other):
#         return NotImplemented
# 
#     def __pos__(self):
#         return String("+" + self.render())
# 
#     def __neg__(self):
#         return String("-" + self.render())
# 
#     def to_dict(self):
#         """Return the Python dict equivalent of this map.
# 
#         If this type can't be expressed as a map, raise.
#         """
#         return dict(self.to_pairs())
# 
#     def to_pairs(self):
#         """Return the Python list-of-tuples equivalent of this map.  Note that
#         this is different from ``self.to_dict().items()``, because Sass maps
#         preserve order.
# 
#         If this type can't be expressed as a map, raise.
#         """
#         raise ValueError("Not a map: {0!r}".format(self))
# 
#     def render(self, compress=False):
#         """Return this value's CSS representation as a string (text, i.e.
#         unicode!).
# 
#         If `compress` is true, try hard to shorten the string at the cost of
#         readability.
#         """
#         raise NotImplementedError
# 
#     def render_interpolated(self, compress=False):
#         """Return this value's string representation as appropriate for
#         returning from an interpolation.
#         """
#         return self.render(compress)


import inspect
import logging
import six
from scss.types import Undefined
from scss.types import Value
    def __repr__(self):
        return "<%s(%s) at 0x%x>" % (type(self).__name__, ', '.join(repr(map) for map in self.maps), id(self))

    def __getitem__(self, key):
        for map in self.maps:
            if key in map:
                return map[key]

        raise KeyError(key)

    def __setitem__(self, key, value):
        self.set(key, value)

    def __contains__(self, key):
        for map in self.maps:
            if key in map:
                return True
        return False

    def keys(self):
        # For mapping interface
        keys = set()
        for map in self.maps:
            keys.update(map.keys())
        return list(keys)

    def set(self, key, value, force_local=False):
        if not force_local:
            for map in self.maps:
                if key in map:

# Path: scss/types.py
# class Undefined(Null):
#     sass_type_name = 'undefined'
# 
#     def __init__(self, value=None):
#         pass
# 
#     def __add__(self, other):
#         return self
# 
#     def __radd__(self, other):
#         return self
# 
#     def __sub__(self, other):
#         return self
# 
#     def __rsub__(self, other):
#         return self
# 
#     def __div__(self, other):
#         return self
# 
#     def __rdiv__(self, other):
#         return self
# 
#     def __truediv__(self, other):
#         return self
# 
#     def __rtruediv__(self, other):
#         return self
# 
#     def __floordiv__(self, other):
#         return self
# 
#     def __rfloordiv__(self, other):
#         return self
# 
#     def __mul__(self, other):
#         return self
# 
#     def __rmul__(self, other):
#         return self
# 
#     def __pos__(self):
#         return self
# 
#     def __neg__(self):
#         return self
# 
# Path: scss/types.py
# class Value(object):
#     is_null = False
#     sass_type_name = 'unknown'
# 
#     def __repr__(self):
#         return "<{0}: {1!r}>".format(type(self).__name__, self.value)
# 
#     # Sass values are all true, except for booleans and nulls
#     def __bool__(self):
#         return True
# 
#     def __nonzero__(self):
#         # Py 2's name for __bool__
#         return self.__bool__()
# 
#     # All Sass scalars also act like one-element spaced lists
#     use_comma = False
# 
#     def __iter__(self):
#         return iter((self,))
# 
#     def __len__(self):
#         return 1
# 
#     def __getitem__(self, key):
#         if key not in (-1, 0):
#             raise IndexError(key)
# 
#         return self
# 
#     def __contains__(self, item):
#         return self == item
# 
#     ### NOTE: From here on down, the operators are exposed to Sass code and
#     ### thus should ONLY return Sass types
# 
#     # Reasonable default for equality
#     def __eq__(self, other):
#         return Boolean(
#             type(self) == type(other) and self.value == other.value)
# 
#     def __ne__(self, other):
#         return Boolean(not self.__eq__(other))
# 
#     # Only numbers support ordering
#     def __lt__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __le__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __gt__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     def __ge__(self, other):
#         raise TypeError("Can't compare %r with %r" % (self, other))
# 
#     # Math ops
#     def __add__(self, other):
#         # Default behavior is to treat both sides like strings
#         if isinstance(other, String):
#             return String(self.render() + other.value, quotes=other.quotes)
#         return String(self.render() + other.render())
# 
#     def __sub__(self, other):
#         # Default behavior is to treat the whole expression like one string
#         return String.unquoted(self.render() + "-" + other.render())
# 
#     def __div__(self, other):
#         return String.unquoted(self.render() + "/" + other.render())
# 
#     # Sass types have no notion of floor vs true division
#     def __truediv__(self, other):
#         return self.__div__(other)
# 
#     def __floordiv__(self, other):
#         return self.__div__(other)
# 
#     def __mul__(self, other):
#         return NotImplemented
# 
#     def __pos__(self):
#         return String("+" + self.render())
# 
#     def __neg__(self):
#         return String("-" + self.render())
# 
#     def to_dict(self):
#         """Return the Python dict equivalent of this map.
# 
#         If this type can't be expressed as a map, raise.
#         """
#         return dict(self.to_pairs())
# 
#     def to_pairs(self):
#         """Return the Python list-of-tuples equivalent of this map.  Note that
#         this is different from ``self.to_dict().items()``, because Sass maps
#         preserve order.
# 
#         If this type can't be expressed as a map, raise.
#         """
#         raise ValueError("Not a map: {0!r}".format(self))
# 
#     def render(self, compress=False):
#         """Return this value's CSS representation as a string (text, i.e.
#         unicode!).
# 
#         If `compress` is true, try hard to shorten the string at the cost of
#         readability.
#         """
#         raise NotImplementedError
# 
#     def render_interpolated(self, compress=False):
#         """Return this value's string representation as appropriate for
#         returning from an interpolation.
#         """
#         return self.render(compress)


# Path: scss/namespace.py
import inspect
import logging
import six
from scss.types import Undefined
from scss.types import Value

    def __repr__(self):
        return "<%s(%s) at 0x%x>" % (type(self).__name__, ', '.join(repr(map) for map in self.maps), id(self))

    def __getitem__(self, key):
        for map in self.maps:
            if key in map:
                return map[key]

        raise KeyError(key)

    def __setitem__(self, key, value):
        self.set(key, value)

    def __contains__(self, key):
        for map in self.maps:
            if key in map:
                return True
        return False

    def keys(self):
        # For mapping interface
        keys = set()
        for map in self.maps:
            keys.update(map.keys())
        return list(keys)

    def set(self, key, value, force_local=False):
        if not force_local:
            for map in self.maps:
                if key in map:

                    if isinstance(map[key], Undefined):