def new(self, cls):
        """Allocator for class cls

        @param self: Class object for which an instance should be
            created.

        @param cls: Same as self.
        """
        if len(cls.__abstractmethods__):
            raise NotImplementedError('Can\'t instantiate class `' + \
                                      cls.__name__ + '\';\n' + \
                                      'Abstract methods: ' + \
                                      ", ".join(cls.__abstractmethods__))

        return object.__new__(self)
Allocator for class cls

        @param self: Class object for which an instance should be
            created.

        @param cls: Same as self.
        
recipes/Python/266468_Abstract_methodsclasses/recipe-266468.py