# Path: moult/compat.py
# PY3 = sys.version_info[0] == 3


from .compat import PY3
                self.dependants.append(dep)
                self._dependants.append(dep)

    def remove_dependant(self, dep):
        if dep in self._dependants:
            self._dependants.remove(dep)

    def restore_dependants(self):
        self._dependants = self.dependants[:]

    def __hash__(self):
        return hash((self.name, self.version))

    def __unicode__(self):
        if self.is_scan:
            fmt = '{name} [{version}]'
        else:
            fmt = '{name} ({version})'
        return fmt.format(name=self.name, version=self.version)

    def __str__(self):
        if PY3:
            return self.__unicode__()
        return self.__unicode__().encode('utf8')

    def __bytes__(self):
        return self.__unicode__().encode('utf8')

    def __repr__(self):
        r = '<PyModule {}>'.format(self.__unicode__())

# Path: moult/compat.py
# PY3 = sys.version_info[0] == 3


# Path: moult/classes.py
from .compat import PY3

                self.dependants.append(dep)
                self._dependants.append(dep)

    def remove_dependant(self, dep):
        if dep in self._dependants:
            self._dependants.remove(dep)

    def restore_dependants(self):
        self._dependants = self.dependants[:]

    def __hash__(self):
        return hash((self.name, self.version))

    def __unicode__(self):
        if self.is_scan:
            fmt = '{name} [{version}]'
        else:
            fmt = '{name} ({version})'
        return fmt.format(name=self.name, version=self.version)

    def __str__(self):
        if PY3:
            return self.__unicode__()
        return self.__unicode__().encode('utf8')

    def __bytes__(self):
        return self.__unicode__().encode('utf8')

    def __repr__(self):
        r = '<PyModule {}>'.format(self.__unicode__())

        if PY3: