Question from the Python test

Python: Decorator that prevents the creation of an instance of a class

Hard

Given the following python3 code:

import abc, time
class MyClass(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def sleep_one(self):
         """Method that should sleep 1 second and return the object instance self"""
Author: Antoine BrennerStatus: PublishedQuestion passed 1936 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!