# Credit to six authors: http://pypi.python.org/pypi/six
# License: MIT


def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    # This requires a bit of explanation: the basic idea is to make a dummy
    # metaclass for one level of class instantiation that replaces itself with
    # the actual metaclass.

    class metaclass(meta):
        def __new__(cls, name, this_bases, d):
            return meta(name, bases, d)
    return type.__new__(metaclass, 'temporary_class', (), {})

@@ -1,8 +1,33 @@
+import sys%0Aimport types%0A%0A
 # Credit
@@ -534,8 +534,209 @@
 (), %7B%7D)%0A
+%0A# Compatability definitions (inspired by six)%0Aif sys.version_info%5B0%5D %3C 3:%0A    string_type = basestring%0A    class_types = (type, types.ClassType)%0Aelse:%0A    string_type = str%0A    class_types = (type, )%0A

Add compataibility definitions